/* =====================================================================
   Rolosistem — main stylesheet
   Brand: Navy #1a2d5f (dominant) | Golden Amber #e8a00a (accent ≤20%)
   ===================================================================== */

/* ── Reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #222;
  background: #f8f8f6;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
ul, ol { list-style: none; }

/* ── CSS Variables ────────────────────────────────────────────────── */
:root {
  --navy:       #1a2d5f;
  --navy-light: #243a78;
  --navy-dark:  #111e3e;
  --gold:       #e8a00a;
  --gold-light: #f0b42a;
  --gold-dark:  #c68a00;
  --white:      #ffffff;
  --gray-50:    #f8f8f6;
  --gray-100:   #f0f0ed;
  --gray-200:   #e0e0dc;
  --gray-400:   #999;
  --gray-600:   #666;
  --gray-800:   #333;
  --red:        #c0392b;
  --green:      #27ae60;
  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  12px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow:     0 2px 8px rgba(0,0,0,.12);
  --shadow-lg:  0 4px 20px rgba(0,0,0,.15);
  --transition: 150ms ease;
  --container:  1200px;
}

/* ── Utilities ────────────────────────────────────────────────────── */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1.4rem; border-radius: var(--radius); border: none; cursor: pointer;
  font-weight: 600; font-size: .95rem; transition: var(--transition); text-decoration: none;
}
.btn--primary   { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-dark); text-decoration: none; }
.btn--accent    { background: var(--gold); color: var(--navy-dark); }
.btn--accent:hover  { background: var(--gold-dark); text-decoration: none; }
.btn--outline   { background: transparent; border: 2px solid var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); text-decoration: none; }
.btn--danger    { background: var(--red); color: var(--white); }
.btn--danger:hover  { filter: brightness(.9); }
.btn--sm        { padding: .35rem .9rem; font-size: .85rem; }
.btn--block     { display: flex; width: 100%; }
.btn-sm         { display: inline-flex; align-items: center; padding: .3rem .8rem; border-radius: var(--radius-sm); font-size: .82rem; background: var(--navy); color: var(--white); font-weight: 600; transition: var(--transition); }
.btn-sm:hover   { background: var(--navy-dark); text-decoration: none; }
.btn-sm--outline { background: transparent; border: 1px solid var(--navy); color: var(--navy); }
.btn-sm--outline:hover { background: var(--navy); color: var(--white); }

/* ── Flash messages ───────────────────────────────────────────────── */
.flash { padding: .75rem 1rem; font-size: .9rem; border-left: 4px solid; margin-bottom: 0; }
.flash--success { background: #d4edda; border-color: var(--green); color: #155724; }
.flash--error   { background: #f8d7da; border-color: var(--red);   color: #721c24; }
.flash p { margin: 0; }

/* ── Header ───────────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky; top: 0; z-index: 200;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  padding-block: .75rem;
}
.logo { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.logo img { height: 40px; width: auto; }
.logo-text { font-size: 1.25rem; font-weight: 700; color: var(--white); white-space: nowrap; }
.logo:hover .logo-text { color: var(--gold-light); }
.main-nav { display: flex; gap: 1.25rem; flex: 1; justify-content: center; }
.main-nav a { color: rgba(255,255,255,.85); font-size: .95rem; font-weight: 500; padding: .25rem 0; border-bottom: 2px solid transparent; transition: var(--transition); }
.main-nav a:hover { color: var(--gold-light); border-color: var(--gold); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.search-form { display: flex; background: rgba(255,255,255,.12); border-radius: var(--radius); overflow: hidden; }
.search-form input { background: transparent; border: none; color: var(--white); padding: .35rem .7rem; width: 180px; outline: none; }
.search-form input::placeholder { color: rgba(255,255,255,.5); }
.search-form button { background: transparent; border: none; color: var(--white); padding: .35rem .6rem; cursor: pointer; }
.search-form button:hover { color: var(--gold-light); }
.cart-btn { position: relative; color: var(--white); font-size: .92rem; display: flex; align-items: center; gap: .3rem; padding: .4rem .6rem; border-radius: var(--radius-sm); transition: var(--transition); }
.cart-btn:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.cart-badge { background: var(--gold); color: var(--navy-dark); border-radius: 999px; min-width: 1.3rem; height: 1.3rem; font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 .3rem; }
.banner-strip { background: var(--gold); color: var(--navy-dark); text-align: center; padding: .4rem 1rem; font-size: .88rem; font-weight: 600; }
.mobile-menu-toggle { display: none; background: transparent; border: 1px solid rgba(255,255,255,.4); color: var(--white); padding: .4rem .6rem; border-radius: var(--radius-sm); cursor: pointer; font-size: 1.1rem; }
.mobile-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-dark); padding: .5rem 0; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity 200ms ease, transform 200ms ease; }
.mobile-nav a { display: block; color: rgba(255,255,255,.85); padding: .75rem 1.5rem; font-size: .95rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.mobile-nav a:hover { background: rgba(255,255,255,.05); color: var(--gold-light); text-decoration: none; }
.mobile-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ── Page layout ──────────────────────────────────────────────────── */
.page-main { flex: 1; }
.page-hero { background: var(--navy); color: var(--white); padding: 3rem 0; text-align: center; }
.page-hero h1 { font-size: 2rem; margin-bottom: .5rem; }
.page-hero p { color: rgba(255,255,255,.75); font-size: 1.05rem; }
.content-section { padding: 3rem 0; }
.section-title { font-size: 1.5rem; font-weight: 700; color: var(--navy); margin-bottom: 1.5rem; }

/* ── Sidebar layout ───────────────────────────────────────────────── */
.shop-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; padding: 2rem 0; }
.sidebar { flex-shrink: 0; }
.sidebar-section { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.25rem; margin-bottom: 1.25rem; border: 1px solid var(--gray-200); }
.sidebar-section h3 { font-size: .88rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-600); margin-bottom: 1rem; font-weight: 600; }
.sidebar-section a { display: block; padding: .4rem 0; color: var(--gray-800); font-size: .92rem; border-bottom: 1px solid var(--gray-100); transition: var(--transition); }
.sidebar-section a:last-child { border-bottom: none; }
.sidebar-section a:hover, .sidebar-section a.active { color: var(--navy); font-weight: 600; text-decoration: none; }
.sidebar-section a.active { padding-left: .5rem; border-left: 3px solid var(--gold); }

/* ── Product grid ─────────────────────────────────────────────────── */
.products-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: .75rem; }
.products-header h1 { font-size: 1.4rem; color: var(--navy); }
.sort-select { border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: .4rem .7rem; font-size: .88rem; cursor: pointer; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.product-card {
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card__img-wrap { aspect-ratio: 4/3; overflow: hidden; background: var(--gray-100); }
.product-card__img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .product-card__img-wrap img { transform: scale(1.04); }
.product-card__body { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.product-card__name { font-size: .95rem; font-weight: 600; color: var(--gray-800); line-height: 1.3; }
.product-card__price { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-top: auto; }
.product-card__price .original { text-decoration: line-through; font-size: .82rem; color: var(--gray-400); font-weight: 400; }
.product-card__unit { font-size: .78rem; color: var(--gray-600); }
.product-card__badge { display: inline-block; background: var(--gold); color: var(--navy-dark); font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: var(--radius-sm); }
.product-card__badge--new { background: var(--navy); color: var(--white); }
.product-card__footer { padding: 0 1rem 1rem; }
.product-card__footer .btn { font-size: .85rem; padding: .5rem 1rem; }

/* ── Pagination ───────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.2rem; height: 2.2rem; padding: 0 .5rem;
  border-radius: var(--radius-sm); font-size: .9rem;
  border: 1px solid var(--gray-200); background: var(--white); color: var(--gray-800);
  transition: var(--transition);
}
.pagination a:hover { background: var(--navy); color: var(--white); border-color: var(--navy); text-decoration: none; }
.pagination span.current { background: var(--navy); color: var(--white); border-color: var(--navy); font-weight: 700; }

/* ── Product detail ───────────────────────────────────────────────── */
.product-detail { padding: 2rem 0; }
.product-detail__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.product-gallery { position: sticky; top: 5rem; }
.product-gallery__main { position: relative; aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden; background: var(--gray-100); border: 1px solid var(--gray-200); margin-bottom: .75rem; }
.product-gallery__main img { width: 100%; height: 100%; object-fit: contain; padding: .5rem; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(255,255,255,.88); border: 1px solid var(--gray-200); border-radius: 50%; width: 38px; height: 38px; font-size: 1.5rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s, box-shadow .15s; box-shadow: 0 1px 4px rgba(0,0,0,.10); }
.gallery-arrow:hover { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.gallery-arrow--prev { left: .5rem; }
.gallery-arrow--next { right: .5rem; }
.product-gallery__thumbs { display: flex; gap: .5rem; flex-wrap: wrap; }
.product-gallery__thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: var(--radius-sm); border: 2px solid var(--gray-200); cursor: pointer; transition: var(--transition); }
.product-gallery__thumbs img:hover { border-color: var(--navy); }
.gallery-thumb--active { border-color: var(--navy) !important; box-shadow: 0 0 0 1px var(--navy); }
.product-info h1 { font-size: 1.65rem; color: var(--navy); margin-bottom: .75rem; line-height: 1.2; }
.product-info__price { font-size: 1.6rem; font-weight: 700; color: var(--navy); margin-bottom: .25rem; }
.product-info__price .original { font-size: 1rem; text-decoration: line-through; color: var(--gray-400); font-weight: 400; margin-left: .5rem; }
.product-info__unit { color: var(--gray-600); font-size: .9rem; margin-bottom: 1.25rem; }
.product-info__desc { color: var(--gray-600); font-size: .95rem; line-height: 1.7; margin-bottom: 1.5rem; }
.add-to-cart-form { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.5rem; }
.add-to-cart-form h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: var(--navy); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; color: var(--gray-600); margin-bottom: .3rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .55rem .75rem; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--white); font-size: .92rem; transition: border-color var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 2px rgba(26,45,95,.1); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group .hint { font-size: .78rem; color: var(--gray-600); margin-top: .25rem; }
.price-preview { background: var(--navy); color: var(--white); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1rem; display: none; }
.price-preview.visible { display: block; }
.price-preview .total { font-size: 1.3rem; font-weight: 700; }
.product-tabs { margin-top: 3rem; }
.tabs-nav { display: flex; border-bottom: 2px solid var(--gray-200); gap: 0; margin-bottom: 1.5rem; }
.tabs-nav button { background: none; border: none; padding: .75rem 1.25rem; font-size: .95rem; color: var(--gray-600); cursor: pointer; font-weight: 500; position: relative; transition: var(--transition); }
.tabs-nav button.active { color: var(--navy); font-weight: 700; }
.tabs-nav button.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--navy); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.specs-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.specs-table tr:nth-child(even) { background: var(--gray-50); }
.specs-table td { padding: .6rem .75rem; border-bottom: 1px solid var(--gray-200); }
.specs-table td:first-child { font-weight: 600; width: 40%; color: var(--gray-600); }
.fixed-mesures-table { width: 100%; border-collapse: collapse; font-size: .9rem; text-align: center; }
.fixed-mesures-table th { background: var(--navy); color: var(--white); padding: .6rem .75rem; }
.fixed-mesures-table td { padding: .55rem .75rem; border-bottom: 1px solid var(--gray-200); }
.fixed-mesures-table tr:nth-child(even) { background: var(--gray-50); }

/* ── Reviews ──────────────────────────────────────────────────────── */
.review { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.review__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.review__author { font-weight: 600; font-size: .92rem; }
.stars { color: var(--gold); font-size: 1rem; letter-spacing: .05em; }
.review__body { font-size: .92rem; color: var(--gray-600); }
.related-products { padding: 3rem 0; border-top: 1px solid var(--gray-200); }

/* ── Cart ─────────────────────────────────────────────────────────── */
.cart-page { padding: 2rem 0; }
.cart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.cart-header h1 { font-size: 1.7rem; color: var(--navy); }
.cart-empty { text-align: center; padding: 4rem 0; color: var(--gray-600); }
.cart-empty p { font-size: 1.1rem; margin-bottom: 1.5rem; }
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.cart-table th { background: var(--navy); color: var(--white); padding: .75rem 1rem; text-align: left; font-size: .88rem; font-weight: 600; }
.cart-table td { padding: .85rem 1rem; border-bottom: 1px solid var(--gray-200); vertical-align: middle; background: var(--white); font-size: .92rem; }
.cart-table tr:last-child td { border-bottom: none; }
.cart-img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--gray-200); }
.cart-product-name { font-weight: 600; }
.cart-product-note { font-size: .8rem; color: var(--gray-600); margin-top: .2rem; font-style: italic; }
.cart-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cart-totals { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.5rem; min-width: 280px; }
.cart-totals__row { display: flex; justify-content: space-between; font-size: .95rem; padding: .4rem 0; border-bottom: 1px solid var(--gray-100); }
.cart-totals__row:last-child { border-bottom: none; font-weight: 700; font-size: 1.1rem; color: var(--navy); }
.cart-actions { display: flex; flex-direction: column; gap: .75rem; }
.cart-input-dim { width: 62px; padding: .28rem .4rem; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: .85rem; text-align: center; background: var(--white); color: var(--navy); }
.cart-input-dim:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 2px rgba(26,45,95,.1); }
.cart-input-qty { width: 56px; padding: .28rem .4rem; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: .85rem; text-align: center; background: var(--white); color: var(--navy); }
.cart-input-qty:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 2px rgba(26,45,95,.1); }
.cart-dim-inputs { display: flex; align-items: center; gap: .25rem; flex-wrap: nowrap; }
.cart-dim-sep { color: var(--gray-400); font-weight: 600; line-height: 1; }
.cart-dim-unit { font-size: .78rem; color: var(--gray-600); }
.cart-actions-cell { white-space: nowrap; }
.cart-actions-cell .btn { margin-left: .25rem; }
.cart-actions-cell .btn:first-child { margin-left: 0; }

/* ── Order form ───────────────────────────────────────────────────── */
.order-page { padding: 2.5rem 0; }
.order-grid { display: grid; grid-template-columns: 1fr 380px; gap: 2.5rem; align-items: start; }
.order-form { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 2rem; }
.order-form h2 { font-size: 1.2rem; color: var(--navy); margin-bottom: 1.5rem; padding-bottom: .75rem; border-bottom: 1px solid var(--gray-200); }
.order-summary { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.5rem; position: sticky; top: 5rem; }
.order-summary h2 { font-size: 1.1rem; color: var(--navy); margin-bottom: 1rem; }
.order-summary__item { display: flex; justify-content: space-between; font-size: .88rem; padding: .4rem 0; border-bottom: 1px solid var(--gray-100); }
.order-summary__item:last-child { border-bottom: none; }
.order-summary__total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem; color: var(--navy); margin-top: .75rem; padding-top: .75rem; border-top: 2px solid var(--navy); }
.order-error { background: #f8d7da; border: 1px solid var(--red); color: #721c24; border-radius: var(--radius-sm); padding: .75rem 1rem; margin-bottom: 1.25rem; font-size: .9rem; }
.delivery-info { background: var(--gray-50); border-radius: var(--radius-sm); padding: 1rem; margin-top: 1rem; font-size: .85rem; color: var(--gray-600); }
.delivery-info strong { display: block; color: var(--navy); margin-bottom: .3rem; }

/* ── Confirmation ─────────────────────────────────────────────────── */
.confirmed-page { text-align: center; padding: 5rem 0; }
.confirmed-page .icon { font-size: 4rem; margin-bottom: 1rem; }
.confirmed-page h1 { font-size: 2rem; color: var(--navy); margin-bottom: 1rem; }
.confirmed-page p { color: var(--gray-600); font-size: 1.05rem; max-width: 480px; margin: 0 auto 1.5rem; }

/* ── Static info pages ────────────────────────────────────────────── */
.info-page { padding: 3rem 0; max-width: 800px; margin-inline: auto; }
.info-page h1 { font-size: 1.8rem; color: var(--navy); margin-bottom: 2rem; }
.info-page h2 { font-size: 1.2rem; color: var(--navy); margin: 2rem 0 .75rem; }
.info-page p { color: var(--gray-600); margin-bottom: 1rem; line-height: 1.8; }
.info-page ul, .info-page ol { color: var(--gray-600); padding-left: 1.5rem; margin-bottom: 1rem; }
.info-page li { margin-bottom: .4rem; line-height: 1.7; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }
.contact-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.5rem; }
.contact-card h3 { color: var(--navy); margin-bottom: .75rem; }
.contact-card p { color: var(--gray-600); font-size: .95rem; margin-bottom: .4rem; }
.contact-card a { color: var(--navy); font-weight: 600; }

/* ── Auth pages ───────────────────────────────────────────────────── */
.auth-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 3rem 1rem; }
.auth-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 2.5rem; width: 100%; max-width: 440px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.5rem; color: var(--navy); text-align: center; margin-bottom: 1.75rem; }
.auth-card .form-error { background: #f8d7da; border: 1px solid var(--red); color: #721c24; border-radius: var(--radius-sm); padding: .65rem .9rem; margin-bottom: 1.25rem; font-size: .88rem; }
.auth-card .form-success { background: #d4edda; border: 1px solid var(--green); color: #155724; border-radius: var(--radius-sm); padding: .65rem .9rem; margin-bottom: 1.25rem; font-size: .88rem; }
.auth-card__footer { text-align: center; margin-top: 1.25rem; font-size: .88rem; color: var(--gray-600); }
.auth-card__footer a { color: var(--navy); font-weight: 600; }

/* ── Maintenance ──────────────────────────────────────────────────── */
.maintenance-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem; }
.maintenance-page h1 { font-size: 2rem; color: var(--navy); margin-bottom: 1rem; }
.maintenance-page p { color: var(--gray-600); font-size: 1.1rem; }

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,.8); padding: 3rem 0 0; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; padding-bottom: 2rem; }
.footer-col h4 { color: var(--white); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem; }
.footer-col p, .footer-col a { display: block; font-size: .85rem; color: rgba(255,255,255,.65); margin-bottom: .3rem; transition: var(--transition); }
.footer-col a:hover { color: var(--gold-light); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1rem 0; text-align: center; }
.footer-bottom p { font-size: .82rem; color: rgba(255,255,255,.4); }

/* ── Admin layout ─────────────────────────────────────────────────── */
.admin-body { background: var(--gray-100); min-height: 100vh; }
.admin-header { background: var(--navy-dark); color: var(--white); padding: .75rem 1.5rem; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 200; box-shadow: var(--shadow); }
.admin-header .brand { font-size: 1.1rem; font-weight: 700; color: var(--white); }
.admin-header .brand span { color: var(--gold); }
.admin-header nav { display: flex; gap: 1.5rem; align-items: center; }
.admin-header nav a { color: rgba(255,255,255,.75); font-size: .88rem; font-weight: 500; transition: var(--transition); }
.admin-header nav a:hover, .admin-header nav a.active { color: var(--white); text-decoration: none; }
.admin-header .user-info { display: flex; align-items: center; gap: 1rem; font-size: .85rem; color: rgba(255,255,255,.7); }
.admin-header .user-info a { color: rgba(255,255,255,.6); }
.admin-header .user-info a:hover { color: var(--white); text-decoration: none; }
.admin-main { padding: 1.5rem; max-width: 1200px; margin-inline: auto; }
.admin-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem; }
.admin-page-header h1 { font-size: 1.4rem; color: var(--navy); font-weight: 700; }
.admin-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); overflow: hidden; margin-bottom: 1.5rem; }
.admin-card__header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.admin-card__header h2 { font-size: 1rem; color: var(--navy); font-weight: 700; }
.admin-card__body { padding: 1.5rem; }

/* ── Admin stats ──────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 1.25rem; border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); min-width: 0; }
.stat-card__label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-600); margin-bottom: .4rem; font-weight: 600; }
.stat-card__value { font-size: 1.6rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat-card__sub { font-size: .82rem; color: var(--gray-600); margin-top: .2rem; }
.stat-card--accent .stat-card__value { color: var(--gold-dark); }
/* ── Dashboard two-column lower section ──────────────────────────── */
.dashboard-lower { display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; align-items: start; }

/* ── Admin table ──────────────────────────────────────────────────── */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th { background: var(--gray-50); color: var(--gray-600); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: .75rem 1rem; text-align: left; border-bottom: 2px solid var(--gray-200); white-space: nowrap; }
.admin-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.admin-table tr:hover td { background: var(--gray-50); }
.admin-table img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--gray-200); }

/* ── Status badges ────────────────────────────────────────────────── */
.status { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.status--pending    { background: #fff3cd; color: #856404; }
.status--confirmed  { background: #d1ecf1; color: #0c5460; }
.status--preparing  { background: #fde8cc; color: #8a4700; }
.status--shipped    { background: #d4edda; color: #155724; }
.status--delivered  { background: #cce5ff; color: #004085; }
.status--cancelled  { background: #f8d7da; color: #721c24; }

/* ── Admin forms ──────────────────────────────────────────────────── */
.admin-form .form-group { margin-bottom: 1.25rem; }
.admin-form label { display: block; font-size: .88rem; font-weight: 600; color: var(--gray-600); margin-bottom: .35rem; }
.admin-form input, .admin-form select, .admin-form textarea {
  width: 100%; padding: .6rem .85rem; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: .92rem; transition: border-color var(--transition);
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 2px rgba(26,45,95,.1); }
.admin-form textarea { resize: vertical; min-height: 100px; }
.input--locked { background: var(--gray-100) !important; color: var(--gray-400) !important; cursor: not-allowed !important; border-color: var(--gray-200) !important; }
.admin-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.admin-form .form-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.admin-form .form-hint { font-size: .78rem; color: var(--gray-400); margin-top: .25rem; }
.admin-form .form-error { color: var(--red); font-size: .82rem; margin-top: .2rem; }
.admin-flash-success { background: #d4edda; border-left: 4px solid var(--green); color: #155724; padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-size: .9rem; }
.admin-flash-error   { background: #f8d7da; border-left: 4px solid var(--red);   color: #721c24; padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-size: .9rem; }

/* ── Order detail (admin) ─────────────────────────────────────────── */
.order-detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; }
.order-meta { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.5rem; }
.order-meta h2 { font-size: 1rem; color: var(--navy); margin-bottom: 1rem; font-weight: 700; }
.order-meta__row { display: flex; font-size: .9rem; padding: .4rem 0; border-bottom: 1px solid var(--gray-100); gap: 1rem; }
.order-meta__row:last-child { border-bottom: none; }
.order-meta__label { font-weight: 600; color: var(--gray-600); min-width: 140px; flex-shrink: 0; }
.order-items-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.order-items-table th { background: var(--gray-50); color: var(--gray-600); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: .65rem .85rem; text-align: left; border-bottom: 2px solid var(--gray-200); }
.order-items-table td { padding: .75rem .85rem; border-bottom: 1px solid var(--gray-100); vertical-align: top; }
.order-items-table tr:last-child td { border-bottom: none; }
.item-additional-info { font-size: .8rem; color: var(--navy); background: #f0f4ff; border-left: 3px solid var(--navy); padding: .3rem .6rem; margin-top: .35rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; }

/* ── Errors ───────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 6rem 2rem; }
.error-page h1 { font-size: 5rem; font-weight: 900; color: var(--navy); opacity: .15; line-height: 1; }
.error-page h2 { font-size: 1.6rem; color: var(--navy); margin-bottom: 1rem; }
.error-page p { color: var(--gray-600); margin-bottom: 2rem; }

/* ── Admin mobile nav ─────────────────────────────────────────────── */
.admin-menu-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.4rem; cursor: pointer; padding: .25rem .5rem; line-height: 1; }
.admin-nav-user { display: none; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .shop-layout { grid-template-columns: 200px 1fr; }
  .product-detail__grid { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
  .order-grid { grid-template-columns: 1fr; }
  .order-detail-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-lower { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  /* ── Public site ── */
  .main-nav, .search-form { display: none; }
  .mobile-menu-toggle { display: block; }
  .shop-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .cart-table thead { display: none; }
  .cart-table td { display: block; padding: .4rem .75rem; }
  .cart-footer { flex-direction: column; }
  .contact-grid { grid-template-columns: 1fr; }

  /* ── Admin header ── */
  .admin-menu-toggle { display: block; }
  .admin-header nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-dark); padding: .5rem 0; box-shadow: 0 4px 12px rgba(0,0,0,.3); z-index: 300; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity 200ms ease, transform 200ms ease; }
  .admin-header nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .admin-header nav a { padding: .75rem 1.25rem; font-size: .95rem; border-bottom: 1px solid rgba(255,255,255,.07); }
  .admin-header nav a:last-of-type { border-bottom: none; }
  .admin-header .user-info { display: none; }
  .admin-nav-user { display: flex; flex-direction: column; gap: .5rem; padding: .75rem 1.25rem; border-top: 1px solid rgba(255,255,255,.15); margin-top: .25rem; font-size: .88rem; color: rgba(255,255,255,.7); }
  .admin-nav-user a { color: rgba(255,255,255,.6); }
  .admin-header { position: relative; }

  /* ── Admin layout ── */
  .admin-main { padding: 1rem; }
  .admin-page-header { margin-bottom: 1rem; }
  .admin-page-header h1 { font-size: 1.2rem; }
  .admin-card__header { padding: .75rem 1rem; }
  .admin-card__body { padding: 1rem; }
  .admin-card { margin-bottom: 1rem; }
  .admin-form .form-row, .admin-form .form-row--3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .stat-card { padding: 1rem; }
  .stat-card__value { font-size: 1.3rem; }

  /* ── Admin tables ── */
  .admin-table { font-size: .82rem; }
  .admin-table th, .admin-table td { padding: .6rem .75rem; }

  /* ── Settings two-column grid ── */
  .admin-settings-grid { grid-template-columns: 1fr !important; }

  /* ── Order detail ── */
  .order-meta__row { flex-direction: column; gap: .2rem; }
  .order-meta__label { min-width: unset; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 1.75rem 1.25rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .admin-main { padding: .75rem; }
}
