/* Lux Watches — cart icon in header + cart/checkout pages.
   Loaded in _meta.html so it applies on every page. */

:root { --cdl-gold: #D4AF37; }

/* Floating cart icon — pinned top-right, comfortably to the left of the
   language dropdown trigger. The trigger pill (flag + code + chevron) is
   ~95–110px wide depending on language, so we leave a generous gap. */
.cdl-cart-fab {
    position: fixed;
    top: 46px;
    right: 140px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    z-index: 55;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: color 0.25s, border-color 0.25s, background-color 0.25s, transform 0.18s;
}
.cdl-cart-fab:hover {
    color: var(--cdl-gold);
    border-color: var(--cdl-gold);
    background: rgba(20, 20, 20, 0.9);
    transform: translateY(-1px);
}
body.cdl-has-announce .cdl-cart-fab { top: 44px; }

.cdl-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--cdl-gold);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    display: none;
    pointer-events: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.85);
}
.cdl-cart-badge--visible { display: inline-block; }

@media (max-width: 768px) {
    .cdl-cart-fab {
        top: auto;
        right: 16px;
        bottom: 84px;       /* sits above the floating WhatsApp button */
        width: 48px;
        height: 48px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    }
    body.cdl-has-announce .cdl-cart-fab { top: auto; }
}

/* "Add to cart" CTA used on product pages */
.cdl-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--cdl-gold);
    border: 1.5px solid var(--cdl-gold);
    padding: 0.95rem 2rem;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.25s;
    text-decoration: none;
    min-width: 220px;
    text-align: center;
}
.cdl-add-btn:hover { background: var(--cdl-gold); color: #000; }
.cdl-add-btn--added { background: #16a34a; border-color: #16a34a; color: #fff; }
.cdl-add-btn--in-cart { background: rgba(212, 175, 55, 0.12); }

/* /cart page */
.cdl-cart-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 9rem 1.5rem 5rem;
    color: #fff;
}
.cdl-cart-page h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--cdl-gold);
    margin-bottom: 2rem;
    text-align: center;
}
.cdl-cart-empty {
    text-align: center;
    padding: 4rem 1rem;
    background: #0a0a0a;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 16px;
    color: #aaa;
}
.cdl-cart-empty p { margin-bottom: 1.5rem; font-size: 1.1rem; }
.cdl-cart-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}
.cdl-cart-item {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 1.25rem;
    align-items: center;
    background: #0a0a0a;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}
.cdl-cart-item img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    background: #050505;
}
.cdl-cart-item-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    color: #fff;
    margin: 0 0 0.4rem;
    line-height: 1.3;
}
.cdl-cart-item-info a { color: inherit; text-decoration: none; }
.cdl-cart-item-info a:hover { color: var(--cdl-gold); }
.cdl-cart-item-info .brand {
    color: var(--cdl-gold);
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}
.cdl-cart-item-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--cdl-gold);
    font-weight: 600;
}
.cdl-cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}
.cdl-cart-remove {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
    padding: 0.25rem 0;
}
.cdl-cart-remove:hover { color: #ff5252; }
.cdl-cart-totals {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.25rem;
    background: linear-gradient(180deg, rgba(20,20,20,0.6) 0%, rgba(5,5,5,0.95) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}
.cdl-cart-totals-label {
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #aaa;
}
.cdl-cart-totals-value {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--cdl-gold);
    font-weight: 600;
}
.cdl-cart-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.cdl-btn-primary,
.cdl-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    border-radius: 9999px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.25s;
    font-size: 1rem;
}
.cdl-btn-primary { background: var(--cdl-gold); color: #000; }
.cdl-btn-primary:hover { background: rgba(212, 175, 55, 0.85); transform: translateY(-1px); }
.cdl-btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }
.cdl-btn-secondary { background: transparent; color: #fff; border: 1.5px solid #444; }
.cdl-btn-secondary:hover { border-color: var(--cdl-gold); color: var(--cdl-gold); }

@media (max-width: 600px) {
    .cdl-cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
    }
    .cdl-cart-item img { width: 80px; height: 80px; }
    .cdl-cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: 0.5rem;
        border-top: 1px solid #1a1a1a;
    }
    .cdl-cart-totals { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
    .cdl-cart-totals-value { font-size: 1.6rem; }
}

/* /checkout page */
.cdl-checkout-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 9rem 1.5rem 5rem;
    color: #fff;
}
.cdl-checkout-page h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    color: var(--cdl-gold);
    margin-bottom: 2rem;
    text-align: center;
}
.cdl-checkout-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    align-items: start;
}
.cdl-checkout-form {
    background: #0a0a0a;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 16px;
    padding: 2rem;
}
.cdl-checkout-form h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--cdl-gold);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}
.cdl-checkout-form h2:not(:first-child) { margin-top: 2rem; }
.cdl-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.cdl-form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.cdl-form-field--full { grid-column: 1 / -1; }
.cdl-form-field label {
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #aaa;
}
.cdl-form-field input,
.cdl-form-field select,
.cdl-form-field textarea {
    background: #050505;
    border: 1px solid #2a2a2a;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, background-color 0.2s;
}
.cdl-form-field input:focus,
.cdl-form-field select:focus,
.cdl-form-field textarea:focus {
    outline: none;
    border-color: var(--cdl-gold);
    background: #0a0a0a;
}
.cdl-form-field textarea { resize: vertical; min-height: 90px; }
.cdl-form-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.1em;
    padding-right: 2.4rem;
}

/* Soft hint shown beneath form fields (e.g. "include +country code") */
.cdl-form-hint {
    font-size: 0.78rem;
    color: #8a8a8a;
    margin-top: 0.35rem;
    line-height: 1.4;
}

.cdl-checkout-summary {
    background: #0a0a0a;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 16px;
    padding: 1.75rem;
    position: sticky;
    top: 110px;
}
.cdl-checkout-summary h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--cdl-gold);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}
.cdl-summary-list {
    display: grid;
    gap: 0.85rem;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 0.25rem;
}
.cdl-summary-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.9rem;
}
.cdl-summary-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
}
.cdl-summary-item-name {
    color: #ddd;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}
.cdl-summary-item-price {
    color: var(--cdl-gold);
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
}
.cdl-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(212, 175, 55, 0.18);
}
.cdl-summary-total-label {
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #aaa;
}
.cdl-summary-total-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--cdl-gold);
    font-weight: 600;
}
.cdl-form-error {
    color: #ff5252;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    min-height: 1.2em;
}
.cdl-place-order-row { margin-top: 1.5rem; }
.cdl-place-order-row .cdl-btn-primary { width: 100%; padding: 1rem; font-size: 1.05rem; }

@media (max-width: 920px) {
    .cdl-checkout-grid { grid-template-columns: 1fr; }
    .cdl-checkout-summary { position: static; }
    .cdl-form-row { grid-template-columns: 1fr; }
}

/* Order confirmation */
.cdl-order-success {
    max-width: 640px;
    margin: 0 auto;
    padding: 12rem 1.5rem 6rem;
    text-align: center;
    color: #fff;
}
.cdl-order-success-icon {
    width: 92px;
    height: 92px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cdl-order-success h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    color: var(--cdl-gold);
    margin-bottom: 1rem;
}
.cdl-order-success p { color: #bbb; line-height: 1.65; margin-bottom: 2rem; font-size: 1.05rem; }
.cdl-order-ref {
    display: inline-block;
    background: #0a0a0a;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    font-family: 'Playfair Display', serif;
    color: var(--cdl-gold);
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

/* "Continue / View cart / Checkout" modal shown after Add to Cart */
.cdl-cart-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    padding: 1rem;
}
.cdl-cart-modal--open { display: flex; animation: cdl-fade-in 0.2s ease; }
@keyframes cdl-fade-in { from { opacity: 0; } to { opacity: 1; } }
.cdl-cart-modal-card {
    position: relative;
    background: #0a0a0a;
    border: 1px solid rgba(212, 175, 55, 0.32);
    border-radius: 18px;
    padding: 2.5rem 2rem 2rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    color: #fff;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    animation: cdl-modal-in 0.25s ease;
}
@keyframes cdl-modal-in {
    from { transform: translateY(12px) scale(0.98); opacity: 0; }
    to   { transform: none; opacity: 1; }
}
.cdl-cart-modal-close {
    position: absolute;
    top: 0.7rem;
    right: 0.9rem;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
}
.cdl-cart-modal-close:hover { color: var(--cdl-gold); }
.cdl-cart-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cdl-cart-modal-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--cdl-gold);
    margin: 0 0 0.5rem;
}
.cdl-cart-modal-card p { color: #bbb; margin-bottom: 1.5rem; }
.cdl-cart-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}
.cdl-cart-modal-actions .cdl-btn-primary,
.cdl-cart-modal-actions .cdl-btn-secondary {
    min-width: 130px;
    padding: 0.7rem 1.1rem;
    font-size: 0.92rem;
}
.cdl-btn-primary--alt { background: rgba(212, 175, 55, 0.16); color: var(--cdl-gold); border: 1.5px solid var(--cdl-gold); }
.cdl-btn-primary--alt:hover { background: var(--cdl-gold); color: #000; }

/* Delivery method radio cards on /checkout */
.cdl-delivery-options {
    display: grid;
    gap: 0.75rem;
}
.cdl-delivery-opt {
    position: relative;
    display: block;
    padding: 1rem 1.1rem;
    background: #050505;
    border: 1.5px solid #2a2a2a;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}
.cdl-delivery-opt:hover { border-color: rgba(212, 175, 55, 0.45); }
.cdl-delivery-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.cdl-delivery-opt-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.cdl-delivery-opt-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #444;
    flex-shrink: 0;
    transition: border-color 0.2s, background-color 0.2s;
    position: relative;
}
.cdl-delivery-opt:has(input[type="radio"]:checked) .cdl-delivery-opt-radio {
    border-color: var(--cdl-gold);
}
.cdl-delivery-opt:has(input[type="radio"]:checked) .cdl-delivery-opt-radio::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--cdl-gold);
}
.cdl-delivery-opt:has(input[type="radio"]:checked) {
    border-color: var(--cdl-gold);
    background: rgba(212, 175, 55, 0.06);
}
/* Selected-card hint applied by JS via .is-selected for browsers without :has() */
.cdl-delivery-opt.is-selected { border-color: var(--cdl-gold); background: rgba(212, 175, 55, 0.06); }
.cdl-delivery-opt.is-selected .cdl-delivery-opt-radio { border-color: var(--cdl-gold); }
.cdl-delivery-opt.is-selected .cdl-delivery-opt-radio::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--cdl-gold);
}
.cdl-delivery-opt-title {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 500;
}
.cdl-delivery-opt-sub {
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.15rem;
}
.cdl-delivery-opt-body { padding-top: 0.75rem; }
.cdl-carrier-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-left: 28px;
}
.cdl-carrier {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 0.65rem;
    border-radius: 6px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
    user-select: none;
}
.cdl-carrier--dhl   { background: #FFCC00; color: #D40511; border-color: #D40511; }
.cdl-carrier--fedex { background: #4D148C; color: #fff; }
.cdl-carrier--fedex span { color: #FF6600; }
.cdl-carrier--ups   { background: #351C15; color: #FFB500; }
.cdl-carrier--ems   { background: #003DA5; color: #fff; }
.cdl-carrier--posta { background: #FFCB05; color: #002B5C; }
.cdl-carrier--gls   { background: #061AB1; color: #FFD200; }
