/* ============================================
   COMMERCE CORE - Storefront Pages
   (Auth · Account · Cart · Favorites)
   Premium Light & Gold — depends on premium.css tokens
   ============================================ */

body.premium-page {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
body.premium-page main { flex: 1 0 auto; }

/* ---- Page heading / breadcrumb ---- */
.page-head { padding: 2.5rem 0 1.5rem; }
.breadcrumb { display: flex; gap: .5rem; align-items: center; font-size: .85rem; color: var(--color-text-light); margin-bottom: .75rem; }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb span { color: var(--color-text-light); }
.page-title { font-family: var(--font-serif); font-size: 2.25rem; font-weight: 600; color: var(--color-primary); }
.page-title span { color: var(--color-accent); }
.page-subtitle { color: var(--color-text-muted); margin-top: .5rem; }

/* ---- Shared form primitives ---- */
.field { margin-bottom: 1.25rem; }
.field__label { display: block; font-size: .85rem; font-weight: 600; color: var(--color-text-main); margin-bottom: .5rem; }
.field__control {
    width: 100%; padding: .85rem 1rem; font-size: .95rem; font-family: var(--font-sans);
    color: var(--color-text-main); background: var(--color-surface);
    border: 1px solid var(--color-border); border-radius: 10px; outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.field__control::placeholder { color: var(--color-text-light); }
.field__control:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(14,117,107,.15); }
.field__control:disabled { background: var(--color-bg-alt); color: var(--color-text-muted); cursor: not-allowed; }
.field__hint { font-size: .78rem; color: var(--color-text-light); margin-top: .4rem; }
.field__error { font-size: .78rem; color: var(--color-danger); margin-top: .4rem; display: none; }
.field.has-error .field__control { border-color: var(--color-danger); }
.field.has-error .field__error { display: block; }

.input-wrap { position: relative; }
.input-wrap .toggle-pass {
    position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
    color: var(--color-text-light); display: flex; padding: .25rem; border-radius: 6px;
}
.input-wrap .toggle-pass:hover { color: var(--color-accent); }
.input-wrap .toggle-pass svg { width: 20px; height: 20px; }
.input-wrap .field__control { padding-right: 2.75rem; }

/* Buttons extensions */
.btn--block { width: 100%; }
.btn--lg { padding: .95rem 1.5rem; font-size: 1rem; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }

/* Inline alerts */
.alert { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-radius: 10px; font-size: .9rem; margin-bottom: 1.25rem; }
.alert--error { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.alert--success { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.alert[hidden] { display: none; }

/* ============================================
   AUTH (login / register)
   ============================================ */
.auth { display: flex; align-items: center; justify-content: center; padding: 3.5rem 1.5rem; }
.auth__card {
    width: 100%; max-width: 440px; background: var(--color-surface);
    border: 1px solid var(--color-border); border-radius: 18px;
    box-shadow: var(--shadow-premium); padding: 2.5rem;
}
.auth__brand { text-align: center; margin-bottom: 2rem; }
.auth__brand-logo { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 700; color: var(--color-primary); }
.auth__brand-logo span { color: var(--color-accent); }
.auth__title { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; color: var(--color-primary); margin-bottom: .35rem; }
.auth__subtitle { color: var(--color-text-muted); font-size: .92rem; margin-bottom: 1.75rem; }
.auth__row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; font-size: .85rem; }
.auth__row a { color: var(--color-accent); font-weight: 500; }
.auth__row a:hover { color: var(--color-accent-hover); }
.check { display: inline-flex; align-items: center; gap: .5rem; color: var(--color-text-muted); cursor: pointer; }
.check input { accent-color: var(--color-accent); width: 16px; height: 16px; }
.auth__divider { display: flex; align-items: center; gap: 1rem; color: var(--color-text-light); font-size: .8rem; margin: 1.5rem 0; }
.auth__divider::before, .auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }
.auth__foot { text-align: center; font-size: .9rem; color: var(--color-text-muted); }
.auth__foot a { color: var(--color-accent); font-weight: 600; }
.auth__foot a:hover { color: var(--color-accent-hover); }
.auth__back { display: inline-flex; align-items: center; gap: .4rem; color: var(--color-text-muted); font-size: .85rem; margin-top: 1.5rem; }
.auth__back:hover { color: var(--color-accent); }
.demo-hint { margin-top: 1.25rem; background: var(--color-bg-alt); border-radius: 10px; padding: .75rem 1rem; font-size: .8rem; color: var(--color-text-muted); text-align: center; }
.demo-hint strong { color: var(--color-primary); }

/* ============================================
   ACCOUNT (profile dashboard)
   ============================================ */
.account-layout { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; padding-bottom: 4rem; align-items: start; }

.account-side { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 1.25rem; }
.profile-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 1.75rem; text-align: center; box-shadow: var(--shadow-sm); }
.avatar { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-size: 2rem; font-weight: 700; color: var(--color-surface); background: linear-gradient(135deg, var(--color-primary), #374151); border: 3px solid var(--color-accent); }
.profile-card__name { font-weight: 600; font-size: 1.1rem; color: var(--color-primary); }
.profile-card__email { font-size: .85rem; color: var(--color-text-muted); margin-top: .2rem; word-break: break-all; }
.profile-card__badge { display: inline-block; margin-top: .75rem; font-size: .72rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: .25rem .7rem; border-radius: 20px; background: rgba(14,117,107,.15); color: var(--color-accent-hover); }

.account-menu { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: .6rem; box-shadow: var(--shadow-sm); }
.account-menu a { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-radius: 10px; color: var(--color-text-main); font-weight: 500; font-size: .92rem; transition: var(--transition-fast); }
.account-menu a svg { width: 19px; height: 19px; color: var(--color-text-light); transition: var(--transition-fast); }
.account-menu a:hover { background: var(--color-bg-alt); color: var(--color-primary); }
.account-menu a:hover svg { color: var(--color-accent); }
.account-menu a.active { background: var(--color-primary); color: var(--color-surface); }
.account-menu a.active svg { color: var(--color-accent); }
.account-menu a.danger { color: var(--color-danger); }
.account-menu a.danger svg { color: var(--color-danger); }
.account-menu a.danger:hover { background: #FEF2F2; }

.account-main { display: flex; flex-direction: column; gap: 1.5rem; }
.panel { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 1.75rem; box-shadow: var(--shadow-sm); }
.panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.panel__title { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; color: var(--color-primary); }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; padding: 1.4rem; box-shadow: var(--shadow-sm); }
.stat__val { font-family: var(--font-serif); font-size: 1.9rem; font-weight: 700; color: var(--color-primary); line-height: 1; }
.stat__label { font-size: .82rem; color: var(--color-text-muted); margin-top: .5rem; }
.stat__ico { width: 40px; height: 40px; border-radius: 10px; background: var(--color-bg-alt); display: flex; align-items: center; justify-content: center; color: var(--color-accent); margin-bottom: 1rem; }
.stat__ico svg { width: 20px; height: 20px; }

.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.detail { border-bottom: 1px solid var(--color-border); padding-bottom: .9rem; }
.detail__label { font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--color-text-light); margin-bottom: .35rem; }
.detail__value { font-weight: 500; color: var(--color-text-main); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ============================================
   CART
   ============================================ */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; align-items: start; padding-bottom: 4rem; }
.cart-layout > * { min-width: 0; }
.cart-items { display: flex; flex-direction: column; gap: 1rem; }
.cart-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 1.25rem; align-items: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; padding: 1rem; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition-fast); }
.cart-row:hover { box-shadow: var(--shadow-md); }
.cart-thumb { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: var(--color-bg-alt); }
.cart-info__cat { font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--color-text-light); }
.cart-info__name { font-weight: 600; color: var(--color-primary); margin: .2rem 0; }
.cart-info__name:hover { color: var(--color-accent); }
.cart-info__variant { font-size: .82rem; color: var(--color-text-muted); }
.cart-custom { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cart-custom__item { padding: 5px 8px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); color: var(--color-text-muted); font-size: .72rem; line-height: 1.25; }
.cart-custom__item b { color: var(--color-heading); font-weight: 700; }
.cart-info__price { font-size: .88rem; color: var(--color-text-muted); margin-top: .35rem; }
.cart-end { display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; }
.cart-line-total { font-weight: 700; font-size: 1.1rem; color: var(--color-primary); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; }
.stepper button { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--color-primary); background: var(--color-surface); transition: var(--transition-fast); }
.stepper button:hover { background: var(--color-bg-alt); color: var(--color-accent); }
.stepper button:disabled { color: var(--color-text-light); cursor: not-allowed; }
.stepper input { width: 42px; text-align: center; border: none; border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border); font-size: .9rem; font-weight: 600; color: var(--color-primary); outline: none; -moz-appearance: textfield; height: 34px; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-remove { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--color-text-light); }
.cart-remove:hover { color: var(--color-danger); }
.cart-remove svg { width: 16px; height: 16px; }

.summary { position: sticky; top: 100px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 1.75rem; box-shadow: var(--shadow-md); }
.summary__title { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; color: var(--color-primary); margin-bottom: 1.25rem; }
.summary__row { display: flex; justify-content: space-between; font-size: .92rem; color: var(--color-text-muted); padding: .55rem 0; }
.summary__row strong { color: var(--color-text-main); font-weight: 600; }
.summary__free { color: var(--color-success); font-weight: 600; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--color-border); margin-top: .75rem; padding-top: 1rem; }
.summary__total span { color: var(--color-text-muted); font-size: .9rem; }
.summary__total b { font-family: var(--font-serif); font-size: 1.6rem; color: var(--color-primary); }
.summary .btn { margin-top: 1.25rem; }
.summary__note { font-size: .78rem; color: var(--color-text-light); text-align: center; margin-top: 1rem; display: flex; align-items: center; justify-content: center; gap: .4rem; }
.summary__note svg { width: 15px; height: 15px; }

/* ============================================
   FAVORITES
   ============================================ */
.fav-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding-bottom: 4rem; }
.fav-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition-base); display: flex; flex-direction: column; position: relative; }
.fav-card:hover { box-shadow: var(--shadow-premium); transform: translateY(-4px); }
.fav-card__imgwrap { position: relative; aspect-ratio: 1; background: var(--color-bg-alt); overflow: hidden; }
.fav-card__imgwrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.fav-card:hover .fav-card__imgwrap img { transform: scale(1.05); }
.fav-card__badge { position: absolute; top: 10px; left: 10px; background: var(--color-danger); color: #fff; font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 4px; }
.fav-remove { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; color: var(--color-danger); box-shadow: var(--shadow-sm); transition: var(--transition-fast); }
.fav-remove:hover { background: var(--color-danger); color: #fff; }
.fav-remove svg { width: 17px; height: 17px; }
.fav-card__body { padding: 1rem 1.1rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.fav-card__cat { font-size: .74rem; text-transform: uppercase; letter-spacing: 1px; color: var(--color-text-light); margin-bottom: .3rem; }
.fav-card__name { font-weight: 600; color: var(--color-primary); line-height: 1.35; margin-bottom: .6rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.fav-card__name:hover { color: var(--color-accent); }
.fav-card__price { display: flex; align-items: baseline; gap: .5rem; margin-bottom: 1rem; margin-top: auto; }
.fav-card__price b { font-weight: 700; font-size: 1.15rem; color: var(--color-primary); }
.fav-card__price s { color: var(--color-text-light); font-size: .85rem; }

/* ============================================
   CHECKOUT
   ============================================ */
.checkout-block { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 1.5rem; box-shadow: var(--shadow-sm); margin-bottom: 1.5rem; }
.checkout-block__title { font-family: var(--font-serif); font-size: 1.2rem; color: var(--color-primary); margin-bottom: 1.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.checkout-step { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--color-primary); color: #fff; font-size: .8rem; font-weight: 700; margin-right: .5rem; }
.addr-option, .pay-option { display: flex; gap: .8rem; align-items: flex-start; border: 1px solid var(--color-border); border-radius: 12px; padding: 1rem; cursor: pointer; margin-bottom: .75rem; transition: var(--transition-fast); }
.pay-option[hidden] { display: none !important; }
.addr-option:hover, .pay-option:hover { border-color: var(--color-accent); }
.addr-option.selected, .pay-option.selected { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(14,117,107,.15); background: #F2F8F7; }
.addr-option input, .pay-option input { accent-color: var(--color-accent); margin-top: .2rem; width: 17px; height: 17px; flex-shrink: 0; }
.addr-option__body, .pay-option__body { flex: 1; }
.addr-option__title, .pay-option__title { font-weight: 600; color: var(--color-primary); }
.addr-option__text, .pay-option__desc { font-size: .84rem; color: var(--color-text-muted); margin-top: .25rem; line-height: 1.5; }
.payment-buyer-info { margin: .25rem 0 1rem; padding: 1rem; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-bg-alt); }
.payment-buyer-info[hidden] { display: none !important; }
.payment-buyer-info .field { margin-bottom: .65rem; }
.payment-buyer-info .field__help, .payment-buyer-info__note { display: block; margin-top: .45rem; color: var(--color-text-muted); font-size: .8rem; line-height: 1.5; }
.payment-buyer-info__note { margin-bottom: 0; }
.pay-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--color-bg-alt); display: flex; align-items: center; justify-content: center; color: var(--color-accent-hover); flex-shrink: 0; }
.pay-icon svg { width: 20px; height: 20px; }
.checkout-success { text-align: center; max-width: 540px; margin: 2.5rem auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 18px; padding: 3rem 2rem; box-shadow: var(--shadow-premium); }
.checkout-success__icon { width: 76px; height: 76px; border-radius: 50%; background: #ECFDF5; color: var(--color-success); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; }
.checkout-success__icon svg { width: 38px; height: 38px; }
.checkout-success__no { display: inline-block; margin: .5rem 0 1.5rem; font-family: var(--font-serif); font-size: 1.3rem; color: var(--color-primary); background: var(--color-bg-alt); border-radius: 10px; padding: .5rem 1.25rem; letter-spacing: 1px; }

/* ============================================
   ORDERS (customer)
   ============================================ */
.orders-list { display: flex; flex-direction: column; gap: 1.25rem; padding-bottom: 4rem; }
.order-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.order-card__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.order-card__no { font-weight: 700; color: var(--color-primary); font-size: 1.02rem; }
.order-card__date { font-size: .82rem; color: var(--color-text-muted); margin-top: .2rem; }
.order-card__right { display: flex; align-items: center; gap: 1.25rem; }
.order-card__total { font-family: var(--font-serif); font-weight: 700; font-size: 1.25rem; color: var(--color-primary); }
.order-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 600; padding: .3rem .7rem; border-radius: 20px; white-space: nowrap; }
.order-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.o-pending { background: #FEF3C7; color: #92400E; }
.o-confirmed { background: #DBEAFE; color: #1E40AF; }
.o-preparing { background: #E0E7FF; color: #3730A3; }
.o-shipped { background: #CFFAFE; color: #155E75; }
.o-delivered { background: #D1FAE5; color: #065F46; }
.o-cancelled { background: #FEE2E2; color: #991B1B; }
.order-card__body { padding: 1.25rem 1.5rem; display: none; }
.order-card__body.open { display: block; }
.order-item { display: flex; align-items: center; justify-content: space-between; padding: .7rem 0; border-bottom: 1px dashed var(--color-border); font-size: .9rem; }
.order-item:last-child { border-bottom: none; }
.order-item__name { color: var(--color-text-main); }
.order-item__qty { color: var(--color-text-muted); font-size: .82rem; margin-left: .35rem; }
.order-toggle { display: inline-flex; align-items: center; gap: .35rem; color: var(--color-accent-hover); font-weight: 600; font-size: .85rem; }
.order-toggle svg { width: 15px; height: 15px; transition: transform var(--transition-fast); }
.order-toggle.open svg { transform: rotate(180deg); }
.order-summary-line { display: flex; justify-content: space-between; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--color-border); font-size: .9rem; color: var(--color-text-muted); }
.order-summary-line b { color: var(--color-primary); font-size: 1.05rem; }

/* Order tracking timeline */
.track-timeline { display: flex; justify-content: space-between; margin: .25rem 0 1.5rem; position: relative; }
.track-timeline::before { content: ""; position: absolute; top: 11px; left: 8%; right: 8%; height: 2px; background: var(--color-border); z-index: 0; }
.track-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .45rem; flex: 1; }
.track-step__dot { width: 24px; height: 24px; border-radius: 50%; background: var(--color-surface); border: 2px solid var(--color-border); display: flex; align-items: center; justify-content: center; color: var(--color-text-light); }
.track-step__dot svg { width: 13px; height: 13px; }
.track-step.done .track-step__dot { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.track-step.current .track-step__dot { background: var(--color-accent); border-color: var(--color-accent); color: #fff; box-shadow: 0 0 0 4px rgba(14,117,107,.2); }
.track-step__label { font-size: .72rem; color: var(--color-text-light); text-align: center; }
.track-step.done .track-step__label, .track-step.current .track-step__label { color: var(--color-primary); font-weight: 600; }
.track-box { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 10px; padding: .85rem 1rem; margin-bottom: 1rem; font-size: .88rem; }
.track-box__sub { color: var(--color-text-muted); font-size: .8rem; margin-top: .3rem; }
.track-cancelled { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; border-radius: 10px; padding: .85rem 1rem; margin-bottom: 1rem; font-size: .88rem; font-weight: 600; }

/* Header notification bell */
.notif-wrap { position: relative; }
.notif-btn { position: relative; color: var(--color-primary); display: flex; align-items: center; }
.notif-btn svg { width: 22px; height: 22px; }
.notif-btn:hover { color: var(--color-accent); }
.notif-badge { position: absolute; top: -6px; right: -6px; background: var(--color-danger); color: #fff; font-size: .68rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
.notif-panel { position: absolute; top: calc(100% + 12px); right: 0; width: 340px; max-width: 90vw; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 200; overflow: hidden; display: none; }
.notif-panel.open { display: block; }
.notif-panel__head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; border-bottom: 1px solid var(--color-border); }
.notif-panel__head strong { font-family: var(--font-serif); color: var(--color-primary); }
.notif-panel__head button { font-size: .78rem; color: var(--color-accent-hover); font-weight: 600; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex; gap: .7rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--color-border); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: #F2F8F7; }
.notif-item__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); margin-top: .4rem; flex-shrink: 0; }
.notif-item.read .notif-item__dot { background: var(--color-border); }
.notif-item__title { font-weight: 600; font-size: .85rem; color: var(--color-primary); }
.notif-item__msg { font-size: .8rem; color: var(--color-text-muted); line-height: 1.5; margin-top: .2rem; }
.notif-item__time { font-size: .72rem; color: var(--color-text-light); margin-top: .3rem; }
.notif-empty { padding: 2rem 1.1rem; text-align: center; color: var(--color-text-muted); font-size: .85rem; }

/* ============================================
   OTP / E-POSTA DOĞRULAMA
   ============================================ */
.otp-inputs { display: flex; gap: .55rem; justify-content: center; margin: 1.5rem 0 1.25rem; }
.otp-box { width: 52px; height: 60px; text-align: center; font-size: 1.6rem; font-weight: 700; font-family: var(--font-serif); color: var(--color-primary); border: 1.5px solid var(--color-border); border-radius: 12px; outline: none; transition: var(--transition-fast); background: var(--color-surface); -moz-appearance: textfield; }
.otp-box::-webkit-outer-spin-button, .otp-box::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.otp-box:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(14,117,107,.15); }
.otp-box.filled { border-color: var(--color-accent); background: #F2F8F7; }
.verify-email-label { text-align: center; font-size: .9rem; color: var(--color-text-muted); margin-bottom: .25rem; }
.verify-email-label strong { color: var(--color-primary); }
.verify-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .85rem; color: var(--color-text-muted); margin: 1.25rem 0; }
.verify-timer { font-weight: 600; color: var(--color-primary); }
.verify-timer.expired { color: var(--color-danger); }
.resend-btn { background: none; color: var(--color-accent-hover); font-weight: 600; font-size: .85rem; cursor: pointer; }
.resend-btn:disabled { color: var(--color-text-light); cursor: not-allowed; }
@media (max-width: 480px) { .otp-box { width: 44px; height: 52px; font-size: 1.35rem; } }

/* ============================================
   CONTENT / LEGAL / INFO PAGES
   ============================================ */
.content-page { max-width: 900px; margin: 0 auto; padding-bottom: 4rem; }
.content-page__lead { color: var(--color-text-muted); font-size: 1.05rem; line-height: 1.7; margin-bottom: 2rem; }
.content-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 2rem 2.25rem; box-shadow: var(--shadow-sm); margin-bottom: 1.5rem; }
.content-card h2 { font-family: var(--font-serif); font-size: 1.4rem; color: var(--color-primary); margin-bottom: 1rem; scroll-margin-top: 100px; }
.content-card h3 { font-size: 1.05rem; color: var(--color-primary); margin: 1.25rem 0 .5rem; }
.content-card p, .content-card li { color: var(--color-text-muted); line-height: 1.75; margin-bottom: .75rem; }
.content-card ul, .content-card ol { padding-left: 1.25rem; margin-bottom: .75rem; }
.content-card li { margin-bottom: .4rem; }
.content-card strong { color: var(--color-text-main); }
.content-card a { color: var(--color-accent-hover); }
.placeholder-note { background: #FFFBEB; border: 1px dashed var(--color-accent); border-radius: 10px; padding: .6rem .9rem; font-size: .82rem; color: #92610a; margin: .5rem 0; }

/* Table of contents (legal) */
.toc { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.toc a { font-size: .85rem; font-weight: 600; color: var(--color-primary); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 20px; padding: .5rem 1rem; transition: var(--transition-fast); }
.toc a:hover { border-color: var(--color-accent); color: var(--color-accent-hover); }
.toc a.active,
.toc a[aria-current="page"] { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.legal-version { display: inline-flex; margin: -.35rem 0 1.25rem !important; padding: .3rem .65rem; border-radius: 999px; background: var(--color-bg-alt); color: var(--color-text-light) !important; font-size: .75rem; font-weight: 700; }

/* FAQ accordion */
.faq-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; margin-bottom: .75rem; overflow: hidden; }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: 1.1rem 1.4rem; font-weight: 600; color: var(--color-primary); font-size: .98rem; text-align: left; background: none; }
.faq-q:hover { color: var(--color-accent-hover); }
.faq-q svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform var(--transition-fast); color: var(--color-text-light); }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a__inner { padding: 0 1.4rem 1.2rem; color: var(--color-text-muted); line-height: 1.7; }
.faq-item.open .faq-a { max-height: 400px; }

/* About / contact */
.about-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; margin-bottom: 2.5rem; }
.about-hero__img { border-radius: 16px; overflow: hidden; border: 1px solid var(--color-border); box-shadow: var(--shadow-md); aspect-ratio: 4/3; background: var(--color-bg-alt); }
.about-hero__img img { width: 100%; height: 100%; object-fit: cover; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 1.5rem 0; }
.value-box { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; padding: 1.5rem; text-align: center; box-shadow: var(--shadow-sm); }
.value-box__ico { width: 48px; height: 48px; border-radius: 12px; background: rgba(14,117,107,.14); color: var(--color-accent-hover); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.value-box__ico svg { width: 24px; height: 24px; }
.value-box h3 { font-family: var(--font-serif); color: var(--color-primary); font-size: 1.1rem; margin-bottom: .4rem; }
.value-box p { color: var(--color-text-muted); font-size: .88rem; line-height: 1.6; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.contact-box { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; padding: 1.5rem; box-shadow: var(--shadow-sm); }
.contact-box__ico { width: 42px; height: 42px; border-radius: 10px; background: var(--color-bg-alt); color: var(--color-accent-hover); display: flex; align-items: center; justify-content: center; margin-bottom: .9rem; }
.contact-box__ico svg { width: 20px; height: 20px; }
.contact-box h3 { font-size: .95rem; color: var(--color-primary); margin-bottom: .3rem; }
.contact-box p, .contact-box a { color: var(--color-text-muted); font-size: .9rem; line-height: 1.6; }

@media (max-width: 768px) {
    .about-hero { grid-template-columns: 1fr; }
    .value-grid, .contact-grid { grid-template-columns: 1fr; }
    .content-card { padding: 1.5rem; }
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty { text-align: center; max-width: 480px; margin: 2rem auto; padding: 3.5rem 1.5rem; }
.empty__icon { width: 90px; height: 90px; border-radius: 50%; background: var(--color-bg-alt); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; color: var(--color-text-light); }
.empty__icon svg { width: 40px; height: 40px; }
.empty__title { font-family: var(--font-serif); font-size: 1.5rem; color: var(--color-primary); margin-bottom: .6rem; }
.empty__text { color: var(--color-text-muted); margin-bottom: 1.75rem; }

/* ---- Spinner ---- */
.spinner { width: 38px; height: 38px; border: 3px solid var(--color-border); border-top-color: var(--color-accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 3rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-wrap { padding: 2rem; text-align: center; color: var(--color-text-muted); }

/* ============================================
   TOASTS
   ============================================ */
.toast-container { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 9999; display: flex; flex-direction: column; gap: .6rem; max-width: 360px; }
.toast { display: flex; align-items: center; gap: .7rem; background: var(--color-surface); border: 1px solid var(--color-border); border-left: 4px solid var(--color-text-light); border-radius: 10px; padding: .85rem 1rem; box-shadow: var(--shadow-lg); animation: toastIn .3s ease; }
.toast.removing { animation: toastOut .3s ease forwards; }
.toast__icon { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.toast__message { font-size: .9rem; color: var(--color-text-main); flex: 1; }
.toast__close { color: var(--color-text-light); font-size: 1.1rem; line-height: 1; }
.toast__close:hover { color: var(--color-text-main); }
.toast--success { border-left-color: var(--color-success); }
.toast--success .toast__icon { background: var(--color-success); }
.toast--error { border-left-color: var(--color-danger); }
.toast--error .toast__icon { background: var(--color-danger); }
.toast--info { border-left-color: var(--color-accent); }
.toast--info .toast__icon { background: var(--color-accent); }
.toast--warning { border-left-color: #F59E0B; }
.toast--warning .toast__icon { background: #F59E0B; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .fav-grid { grid-template-columns: repeat(3, 1fr); }
    .account-layout { grid-template-columns: 240px 1fr; }
}
@media (max-width: 860px) {
    .cart-layout { grid-template-columns: 1fr; }
    .summary { position: static; }
    .account-layout { grid-template-columns: 1fr; }
    .account-side { position: static; flex-direction: column; }
}
@media (max-width: 640px) {
    .fav-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .page-title { font-size: 1.7rem; }
    .detail-list, .form-row { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; }
    .auth__card { padding: 1.75rem; }
    .cart-row { grid-template-columns: 72px 1fr; }
    .cart-thumb { width: 72px; height: 72px; }
    .cart-end { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
    .checkout-block, .summary { padding: 1.15rem; }
    .checkout-block__title { flex-wrap: wrap; }
}

/* ============================================
   Sipariş kalemi yorum kontrolü + Yorum modalı
   ============================================ */
.order-item__right { display: inline-flex; align-items: center; gap: .75rem; }
.btn--sm { padding: .45rem .8rem; font-size: .8rem; }
.btn--ghost { background: transparent; border: 1px solid var(--color-border); color: var(--color-text-muted); }
.btn--ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }

.rev-tag { font-size: .76rem; font-weight: 600; padding: .3rem .6rem; border-radius: 20px; white-space: nowrap; }
.rev-tag--ok { color: #157347; background: rgba(25,135,84,.12); }
.rev-tag--wait { color: #9a6a00; background: rgba(230,168,23,.14); }
.rev-tag--no { color: #b02a37; background: rgba(220,53,69,.12); }

/* Modal */
.rev-modal { position: fixed; inset: 0; background: rgba(17,24,39,.55); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 1rem; }
.rev-modal.open { display: flex; }
.rev-modal__box { background: var(--color-surface, #fff); width: 100%; max-width: 480px; border-radius: 16px; padding: 1.75rem; position: relative; box-shadow: 0 24px 60px rgba(0,0,0,.25); max-height: 90vh; overflow-y: auto; }
.rev-modal__close { position: absolute; top: .9rem; right: 1rem; background: none; border: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--color-text-muted); }
.rev-modal__title { font-family: var(--font-serif); font-size: 1.35rem; color: var(--color-primary); margin-bottom: .25rem; }
.rev-modal__product { color: var(--color-text-muted); font-size: .9rem; margin-bottom: 1rem; }
.rev-stars-input { display: flex; gap: .25rem; margin-bottom: 1rem; }
.rev-star { background: none; border: none; font-size: 2rem; line-height: 1; cursor: pointer; color: #d9cfbe; transition: color .12s, transform .12s; padding: 0; }
.rev-star:hover { transform: scale(1.12); }
.rev-star.on { color: #e6a817; }
.rev-input { width: 100%; padding: .7rem .85rem; border: 1px solid var(--color-border); border-radius: 10px; font: inherit; margin-bottom: .8rem; background: var(--color-bg-alt, #fff); color: var(--color-text, #222); }
.rev-input:focus { outline: none; border-color: var(--color-accent); }
.rev-textarea { resize: vertical; min-height: 90px; }
.rev-file-label { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; color: var(--color-primary); font-size: .85rem; font-weight: 500; padding: .55rem .9rem; border: 1px dashed var(--color-border); border-radius: 10px; }
.rev-file-label:hover { border-color: var(--color-accent); color: var(--color-accent); }
.rev-file-preview { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.rev-file-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 20px; padding: .25rem .6rem; }
.rev-file-chip button { background: none; border: none; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--color-text-muted); }
.rev-modal__actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; }

/* ============================================
   Checkout — Kupon kutusu
   ============================================ */
.coupon-box { margin: .5rem 0 1rem; padding: .85rem 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.coupon-input { display: flex; gap: .5rem; }
.coupon-input input { flex: 1; min-width: 0; width: 100%; padding: .6rem .8rem; border: 1px solid var(--color-border); border-radius: 10px; font: inherit; text-transform: uppercase; background: var(--color-bg-alt, #fff); color: var(--color-text, #222); }
.coupon-input input:focus { outline: none; border-color: var(--color-accent); }
.coupon-input .btn { white-space: nowrap; }
.coupon-applied { display: flex; align-items: center; justify-content: space-between; gap: .5rem; background: rgba(25,135,84,.08); border: 1px solid rgba(25,135,84,.25); border-radius: 10px; padding: .55rem .8rem; }
.coupon-applied__tag { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: #157347; }
.coupon-applied__tag strong { font-family: var(--font-serif, Georgia, serif); letter-spacing: .5px; }
.coupon-remove { background: none; border: none; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--color-text-muted); }
.coupon-remove:hover { color: var(--color-danger, #b02a37); }
.coupon-msg { font-size: .8rem; margin-top: .5rem; min-height: 1em; }
.coupon-msg--error { color: var(--color-danger, #b02a37); }
.coupon-msg--success { color: #157347; }

/* Checkout progress and readiness states */
.checkout-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
.checkout-progress li { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 11px; align-items: center; min-height: 72px; padding: 13px 15px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); color: var(--color-text-muted); }
.checkout-progress li > span { grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--color-border); border-radius: 50%; background: var(--color-bg-alt); color: var(--color-text-muted); font-weight: 800; }
.checkout-progress strong { align-self: end; color: var(--color-heading, var(--color-primary)); font-size: .88rem; }
.checkout-progress small { align-self: start; margin-top: 2px; font-size: .7rem; line-height: 1.35; }
.checkout-progress .is-complete > span { border-color: var(--color-success); background: var(--color-success); color: #fff; }
.checkout-progress .is-active { border-color: color-mix(in srgb, var(--color-accent) 55%, var(--color-border)); box-shadow: 0 8px 24px color-mix(in srgb, var(--color-accent) 10%, transparent); }
.checkout-progress .is-active > span { border-color: var(--color-accent); background: var(--color-accent); color: #fff; }
#btnPlaceOrder:disabled { cursor: not-allowed; opacity: .55; box-shadow: none; }

@media (max-width: 640px) {
    .checkout-progress { gap: 7px; }
    .checkout-progress li { display: flex; min-height: 56px; padding: 9px; gap: 7px; }
    .checkout-progress li > span { flex: 0 0 30px; width: 30px; height: 30px; font-size: .8rem; }
    .checkout-progress strong { font-size: .72rem; line-height: 1.2; }
    .checkout-progress small { display: none; }
}
