/* A Elegant UAE — Storefront shared styles */
:root {
  --gold: #B38E28;
  --gold-light: #C9A23A;
  --ink: #111010;
  --ink2: #1E1C1C;
  --ground: #F5F3EF;
  --mid: #5A5048;
  --border: #D5CCBE;
  --white: #fff;
  --max-w: 1280px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--ground); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ── Container ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.ae-header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; height: var(--header-h); }
.ae-header-inner { display: flex; align-items: center; gap: 32px; height: 100%; }
.ae-logo { display: flex; align-items: center; flex-shrink: 0; }
.ae-logo img { height: 36px; width: auto; display: block; }
.ae-nav { display: flex; align-items: center; gap: 24px; flex: 1; }
.ae-nav a { color: var(--mid); font-size: 13px; letter-spacing: 0.04em; transition: color 0.15s; }
.ae-nav a:hover, .ae-nav a.active { color: var(--ink); }
.ae-header-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.ae-header-icon { background: none; border: none; cursor: pointer; color: var(--mid); display: flex; align-items: center; transition: color 0.15s; text-decoration: none; }
.ae-header-icon:hover { color: var(--gold); }
.ae-cart-wrap { position: relative; }
.ae-cart-badge { position: absolute; top: -6px; right: -8px; background: var(--gold); color: var(--white); font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: none; align-items: center; justify-content: center; padding: 0 3px; }

/* ── Footer ── */
.ae-footer { background: var(--ink); color: #888; padding: 56px 0 28px; margin-top: 80px; }
.ae-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; padding-bottom: 40px; border-bottom: 1px solid #222; }
@media (max-width: 640px) { .ae-footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.ae-footer-brand p { margin-top: 14px; font-size: 13px; line-height: 1.8; max-width: 260px; color: #888; }
.ae-footer-col h4 { color: #fff; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 16px; }
.ae-footer-col a { display: block; color: #888; font-size: 13px; margin-bottom: 10px; transition: color 0.15s; }
.ae-footer-col a:hover { color: var(--gold); }
.ae-footer-bottom { padding-top: 24px; display: flex; justify-content: space-between; font-size: 12px; gap: 16px; flex-wrap: wrap; }

/* ── Hero ── */
.ae-hero { background: var(--ink); padding: 88px 0; }
.ae-hero-inner { max-width: 560px; }
.ae-hero-tag { font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); margin-bottom: 24px; }
.ae-hero-title { font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 3.2rem); color: #fff; font-weight: 400; line-height: 1.2; text-wrap: balance; margin-bottom: 20px; }
.ae-hero-sub { font-size: 15px; color: #999; line-height: 1.7; margin-bottom: 36px; max-width: 440px; }

/* ── Section header ── */
.ae-section { margin: 64px 0 28px; }
.ae-section-label { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.ae-section-title { font-family: Georgia, serif; font-size: 1.9rem; font-weight: 400; color: var(--ink); }

/* ── Product grid ── */
.ae-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1100px) { .ae-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .ae-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* ── Product card ── */
.ae-card { background: var(--white); border-radius: 8px; overflow: hidden; display: block; transition: box-shadow 0.2s; }
.ae-card:hover { box-shadow: 0 6px 28px rgba(0,0,0,0.1); }
.ae-card-img { aspect-ratio: 1 / 1; overflow: hidden; background: #EBE7E1; }
.ae-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.ae-card:hover .ae-card-img img { transform: scale(1.05); }
.ae-card-body { padding: 16px; }
.ae-card-brand { font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.ae-card-title { font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.35; margin-bottom: 4px; }
.ae-card-sub { font-size: 12px; color: var(--mid); margin-bottom: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ae-card-footer { display: flex; align-items: baseline; justify-content: space-between; }
.ae-card-price { font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.ae-card-compare { font-size: 12px; color: var(--mid); text-decoration: line-through; margin-left: 6px; font-variant-numeric: tabular-nums; }
.ae-view-link { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }

/* ── Collections grid (collections.html) ── */
.ae-col-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .ae-col-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .ae-col-grid { grid-template-columns: 1fr; } }
.ae-col-card { border-radius: 10px; overflow: hidden; position: relative; aspect-ratio: 4 / 3; display: flex; align-items: flex-end; padding: 24px; cursor: pointer; background: var(--ink2); transition: opacity 0.2s; }
.ae-col-card:hover { opacity: 0.92; }
.ae-col-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.ae-col-card-body { position: relative; z-index: 1; }
.ae-col-card-title { font-family: Georgia, serif; font-size: 1.25rem; color: #fff; font-weight: 400; line-height: 1.2; }
.ae-col-card-desc { font-size: 12px; color: #ccc; margin-top: 4px; }

/* ── Category icon strip (homepage) ── */
.ae-cat-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.ae-cat-strip::-webkit-scrollbar { display: none; }
.ae-cat-item { flex: 1; min-width: 88px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 12px; background: var(--white); border-radius: 12px; border: 1.5px solid var(--border); text-align: center; transition: border-color 0.18s, box-shadow 0.18s; }
.ae-cat-item:hover { border-color: var(--gold); box-shadow: 0 2px 16px rgba(0,0,0,0.07); }
.ae-cat-icon { width: 28px; height: 28px; color: var(--gold); }
.ae-cat-icon svg { width: 100%; height: 100%; display: block; }
.ae-cat-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid); font-weight: 600; white-space: nowrap; }

/* ── Buttons ── */
.btn-primary { display: inline-block; background: var(--gold); color: var(--ink); padding: 14px 32px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; border: none; border-radius: 4px; cursor: pointer; transition: background 0.15s; }
.btn-primary:hover { background: var(--gold-light); }
.btn-outline { display: inline-block; background: transparent; color: var(--ink); padding: 12px 28px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; border: 2px solid var(--border); border-radius: 4px; cursor: pointer; transition: all 0.15s; }
.btn-outline:hover { border-color: var(--ink); }

/* ── Loading / empty ── */
.ae-loading { grid-column: 1 / -1; text-align: center; padding: 80px 0; color: var(--mid); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.ae-empty { text-align: center; padding: 80px 0; }
.ae-empty h3 { font-family: Georgia, serif; font-size: 1.5rem; font-weight: 400; margin-bottom: 12px; }
.ae-empty p { color: var(--mid); font-size: 14px; margin-bottom: 24px; }

/* ── Toast ── */
.ae-toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--ink); color: #fff; padding: 12px 24px; border-radius: 6px; font-size: 13px; z-index: 9999; transition: transform 0.28s ease; box-shadow: 0 4px 24px rgba(0,0,0,0.25); white-space: nowrap; }
.ae-toast.show { transform: translateX(-50%) translateY(0); }
.ae-toast.success { border-left: 3px solid var(--gold); }
.ae-toast.error { border-left: 3px solid #d44; }

/* ── Breadcrumb ── */
.ae-breadcrumb { padding: 20px 0 0; font-size: 12px; color: var(--mid); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ae-breadcrumb a { color: var(--mid); }
.ae-breadcrumb a:hover { color: var(--gold); }
.ae-breadcrumb .sep { color: var(--border); }

/* ── Page title ── */
.ae-page-title { padding: 40px 0 32px; margin-bottom: 40px; border-bottom: 1px solid var(--border); }
.ae-page-title h1 { font-family: Georgia, serif; font-size: 2rem; font-weight: 400; margin-bottom: 8px; }
.ae-page-title p { color: var(--mid); font-size: 14px; }

/* ── Product detail ── */
.ae-product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding: 40px 0 80px; align-items: start; }
@media (max-width: 768px) { .ae-product-layout { grid-template-columns: 1fr; gap: 32px; } }
.ae-product-main-img { aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #EBE7E1; }
.ae-product-main-img img { width: 100%; height: 100%; object-fit: cover; }
.ae-product-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.ae-thumb { width: 70px; height: 70px; border-radius: 6px; overflow: hidden; background: #EBE7E1; cursor: pointer; border: 2px solid transparent; flex-shrink: 0; transition: border-color 0.15s; }
.ae-thumb.active { border-color: var(--gold); }
.ae-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ae-product-brand { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.ae-product-title { font-family: Georgia, serif; font-size: 1.9rem; font-weight: 400; line-height: 1.2; margin-bottom: 8px; text-wrap: balance; }
.ae-product-subtitle { color: var(--mid); font-size: 14px; margin-bottom: 24px; }
.ae-product-price { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.ae-product-compare { font-size: 13px; color: var(--mid); text-decoration: line-through; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.ae-product-sku { font-size: 11px; letter-spacing: 0.08em; color: var(--mid); margin-bottom: 24px; }
.ae-product-variants-label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mid); margin-bottom: 10px; }
.ae-variant-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.ae-variant-btn { padding: 8px 18px; border: 1.5px solid var(--border); border-radius: 4px; font-size: 13px; cursor: pointer; background: none; color: var(--ink); transition: border-color 0.15s, background 0.15s; }
.ae-variant-btn:hover { border-color: var(--mid); }
.ae-variant-btn.selected { border-color: var(--ink); background: var(--ink); color: var(--white); }
.ae-product-atc { width: 100%; padding: 16px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; background: var(--gold); color: var(--ink); border: none; border-radius: 4px; cursor: pointer; margin-bottom: 12px; transition: background 0.15s; }
.ae-product-atc:hover:not(:disabled) { background: var(--gold-light); }
.ae-product-atc:disabled { opacity: 0.5; cursor: not-allowed; }
.ae-product-desc { border-top: 1px solid var(--border); padding-top: 28px; margin-top: 8px; }
.ae-product-desc h4 { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--mid); margin-bottom: 12px; }
.ae-product-desc p { font-size: 14px; line-height: 1.8; color: var(--mid); }

/* ── Cart ── */
.ae-cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; padding: 40px 0 80px; align-items: start; }
@media (max-width: 900px) { .ae-cart-layout { grid-template-columns: 1fr; } }
.ae-cart-item { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--border); }
.ae-cart-item-img { width: 80px; height: 80px; border-radius: 6px; overflow: hidden; background: #EBE7E1; flex-shrink: 0; }
.ae-cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.ae-cart-item-title { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.ae-cart-item-variant { font-size: 12px; color: var(--mid); margin-bottom: 12px; }
.ae-qty-row { display: flex; align-items: center; gap: 12px; }
.ae-qty-ctrl { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.ae-qty-btn { width: 32px; height: 32px; background: none; border: none; cursor: pointer; font-size: 18px; color: var(--ink); line-height: 1; transition: background 0.12s; }
.ae-qty-btn:hover { background: var(--ground); }
.ae-qty-val { width: 36px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; border: none; background: none; color: var(--ink); }
.ae-remove-btn { font-size: 11px; color: var(--mid); background: none; border: none; cursor: pointer; letter-spacing: 0.05em; padding: 0; }
.ae-remove-btn:hover { color: #d44; }
.ae-cart-item-price { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 2px; }
.ae-cart-summary { background: var(--white); border-radius: 10px; padding: 28px; position: sticky; top: calc(var(--header-h) + 20px); }
.ae-cart-summary h3 { font-family: Georgia, serif; font-size: 1.2rem; font-weight: 400; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.ae-summary-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 12px; }
.ae-summary-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 4px; }
.ae-checkout-btn { width: 100%; margin-top: 20px; padding: 16px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; background: var(--gold); color: var(--ink); border: none; border-radius: 4px; cursor: pointer; transition: background 0.15s; }
.ae-checkout-btn:hover { background: var(--gold-light); }
.ae-continue-link { display: block; text-align: center; margin-top: 14px; font-size: 12px; color: var(--mid); }
.ae-continue-link:hover { color: var(--ink); }

/* ── Auth ── */
.ae-auth-page { min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.ae-auth-box { background: var(--white); border-radius: 12px; padding: 48px 40px; width: 100%; max-width: 400px; text-align: center; box-shadow: 0 4px 40px rgba(0,0,0,0.08); }
@media (max-width: 480px) { .ae-auth-box { padding: 36px 24px; } }
.ae-auth-mark { width: 52px; height: 52px; background: var(--ink); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.ae-auth-mark span { color: var(--gold); font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.ae-auth-title { font-family: Georgia, serif; font-size: 1.5rem; font-weight: 400; margin-bottom: 8px; }
.ae-auth-sub { color: var(--mid); font-size: 14px; margin-bottom: 28px; line-height: 1.6; }
.ae-auth-input { width: 100%; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: 6px; font-size: 15px; outline: none; transition: border-color 0.15s; margin-bottom: 14px; font-family: inherit; }
.ae-auth-input:focus { border-color: var(--gold); }
.ae-auth-btn { width: 100%; padding: 14px; background: var(--gold); color: var(--ink); border: none; border-radius: 6px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; cursor: pointer; transition: background 0.15s; font-family: inherit; }
.ae-auth-btn:hover:not(:disabled) { background: var(--gold-light); }
.ae-auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ae-auth-msg { margin-top: 16px; font-size: 13px; color: var(--mid); line-height: 1.6; }
.ae-auth-msg.success { color: #2a7a2a; }
.ae-auth-msg.error { color: #c44; }
