/* ============================================================
   ROMA WATCH — Shop page theme override
   Loaded AFTER products.css: repaints the old purple filter
   sidebar / range slider / product grid with the new glass
   design system defined in style.css. Selectors mirror
   products.css so the cascade wins cleanly without !important
   spam.
   ============================================================ */

body{background-image:none;}

/* products.css (legacy purple theme) hardcodes its own --dark-* /
   --background-2 custom properties with fixed purple/navy values and
   never defines light-mode values for them either — so every selector
   that still reads those tokens (page background, filter panel, empty
   -state text, ...) stayed stuck on the old purple palette in BOTH
   themes, instead of following the site's actual brass/black dark
   theme (which is what made the shop page's dark mode look different
   from every other page, like the cart). Remapping the tokens
   themselves — rather than chasing every selector — fixes all of them
   in both modes, including any added later. */
:root{
  --dark-Background: var(--ink);
  --dark-main:       var(--ink-2);
  --dark-buttons:    var(--brass);
  --dark-action:     var(--brass);
  --dark-text:       var(--text);
  --background-2:    var(--glass-brd);
}

.tob-bar-products-page{
  height:auto;box-shadow:none;backdrop-filter:blur(18px) saturate(140%);
  padding:16px 40px;
}
@media (max-width:960px){
  /* This page's header carries an extra products.css class that hardcodes
     desktop-width padding and never had a mobile override, unlike every
     other page's plain .top-bar — so at narrow widths it squeezed the
     centered logo against the icon cluster instead of matching the same
     14px/18px padding the rest of the site already uses on mobile. */
  .tob-bar-products-page{padding:14px 18px;}
}

.all-products-container{
  width:100%;height:auto;margin:0 auto;padding:0 0 20px;
  overflow-x:hidden;
}
.all-products-container h1 i{color:var(--brass);}

.products-page{
  display:grid;
  grid-template-columns:320px 1fr;
  align-items:start;
  gap:26px;
  padding:0 6vw;
}

/* ---------- Filter sidebar ---------- */
.filter-sidebar{
  width:100%;
  border:1px solid var(--glass-brd);
  border-radius:var(--r-lg);
  background:linear-gradient(160deg,var(--glass-2),var(--glass));
  backdrop-filter:blur(20px) saturate(140%);
  padding-top:6px;
  position:sticky;
  top:150px;
  max-height:calc(100vh - 180px);
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:thin;
}
.filter-sidebar:hover{border:1px solid var(--brass);}
.filter-sidebar h2{
  color:var(--text);font-size:1.08rem;height:auto;padding:20px 22px 14px;
  display:flex;align-items:center;border-bottom:1px solid var(--glass-brd);margin-bottom:8px;
}
.filter-sidebar h2 i{color:var(--brass);margin-left:10px;margin-right:0;}

.filter-sidebar .filter-box{
  display:flex;flex-direction:column;
  border-bottom:1px solid rgba(255,255,255,.08);
  margin:0 22px 20px;padding-bottom:18px;gap:11px;
}

.filter-sidebar .filter-box h3{
  color:var(--brass-lt);font-weight:600;font-size:.92rem;
  letter-spacing:.02em;margin-bottom:14px;
}
.filter-box h3 i{color:var(--brass);font-size:.6rem;margin:0 8px 0 0;}

.filter-sidebar .filter-box label{
  display:flex;align-items:center;
  color:var(--text-dim);gap:10px;font-size:.9rem;cursor:pointer;
}
.filter-box label:hover{color:var(--brass-lt);}
.filter-box input{accent-color:var(--brass);width:17px;height:17px;}
.filter-box label span{color:var(--text-faint);font-weight:400;font-size:.82rem;}

.show-more{
  margin-top:10px;background:var(--glass);width:auto;align-self:flex-start;
  padding:8px 18px;border-radius:var(--r-full);
  color:var(--text-dim);font-size:.78rem;font-weight:500;
  border:1px solid var(--glass-brd);
}
.show-more:hover{border-color:var(--brass);color:var(--brass-lt);transform:translateY(-2px);}
.filter-sidebar .show-more.is-open i{transform:rotate(180deg);}

.filter-box{position:relative;}
.filter-box #search-brand{
  box-sizing:border-box;width:100%;
  background:var(--glass-2);border:1.5px solid var(--glass-brd-2);
  padding:12px 18px 12px 16px;border-radius:var(--r-full);color:var(--text);margin-bottom:14px;
  font-size:.88rem;
  box-shadow:inset 0 1px 3px rgba(0,0,0,.08);
  transition:.25s var(--ease);
}
.filter-box #search-brand::placeholder{color:var(--text-faint);}
.filter-box #search-brand:hover{border-color:var(--glass-brd-2);background:var(--glass);}
.filter-box #search-brand:focus{
  outline:none;border-color:var(--brass);background:var(--glass);
  box-shadow:0 0 0 3px rgba(201,162,75,.16);
}

.filter-sidebar::-webkit-scrollbar-thumb{background:var(--brass-dk);}

.reset-filters-btn{
  display:flex;align-items:center;justify-content:center;gap:7px;width:100%;
  background:var(--glass-2);border:1px solid var(--glass-brd-2);color:var(--text-dim);
  border-radius:var(--r-full);padding:12px 18px;font-size:.86rem;margin:16px 0 20px;
  cursor:pointer;transition:.25s var(--ease);font-family:inherit;
}
.reset-filters-btn:hover{border-color:var(--brass);color:var(--brass-lt);background:var(--glass);}

/* ---------- Pagination ---------- */
.pagination-controls{
  display:flex;align-items:center;justify-content:center;gap:8px;
  margin-top:32px;flex-wrap:wrap;
}
.page-btn{
  min-width:38px;height:38px;padding:0 12px;
  display:flex;align-items:center;justify-content:center;
  background:var(--glass);border:1px solid var(--glass-brd);border-radius:var(--r-full);
  color:var(--text-dim);font-size:.85rem;cursor:pointer;font-family:inherit;
  transition:.25s var(--ease);
}
.page-btn:hover:not(:disabled){border-color:var(--brass);color:var(--brass-lt);}
.page-btn.active{
  background:linear-gradient(120deg,var(--brass-lt),var(--brass));
  color:var(--ink);border-color:transparent;font-weight:700;
}
.page-btn:disabled{opacity:.35;cursor:not-allowed;}
.page-ellipsis{color:var(--text-faint);padding:0 4px;}

/* ---------- Toolbar ---------- */
.products-toolbar{
  background:var(--glass);border:1px solid var(--glass-brd);border-radius:var(--r-md);
  backdrop-filter:blur(14px);
}
.product-count{color:var(--text-dim);font-size:.83rem;font-weight:500;}

.sort-select{
  box-sizing:border-box;
  border:1.5px solid var(--glass-brd-2);background:var(--glass-2);color:var(--text);
  border-radius:var(--r-full);padding:9px 16px;font-size:.8rem;cursor:pointer;
  font-family:inherit;transition:.25s var(--ease);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23c9a24b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:left 14px center;
  appearance:none;-webkit-appearance:none;padding-left:32px;
}
.sort-select:hover{border-color:var(--glass-brd-2);background-color:var(--glass);}
.sort-select:focus{outline:none;border-color:var(--brass);box-shadow:0 0 0 3px rgba(201,162,75,.16);}
.sort-select option{background:var(--ink-2);color:var(--text);}

/* ---------- Product grid ---------- */
.products{width:100%;padding:0;}
.products-grid{grid-template-columns:repeat(3,1fr);gap:20px;}
.product-card{width:100%;height:auto;min-height:0;text-align:right;}
.product-card .image{width:auto;max-width:100%;overflow:hidden;}
.product-card .image img{width:auto;max-width:100%;}
.products-grid .product-card{min-height:0;}

/* products.css (legacy purple theme, loaded before this file) still defines
   .product-card .name / .model / .price .current-price / .add-to-cart-btn
   with its own colors — some of those selectors are MORE specific than the
   ones in style.css, so they were winning and the shop cards looked
   different from the homepage. Re-declaring them here (same selectors,
   loaded last) restores full parity. */
.product-card .name{color:var(--brass-lt);font-weight:400;font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;}
.product-card .model{font-size:1rem;font-weight:500;margin-top:4px;color:var(--text);}
.product-card .price .current-price{font-size:1.08rem;font-weight:700;color:var(--brass-lt);margin:0;}
.product-card .price .old-price{font-size:.78rem;color:var(--text-faint);margin:0;text-decoration:line-through;}

.add-to-cart-btn{
  width:100%;padding:12px;border-radius:var(--r-sm);
  background:var(--glass);border:1px solid var(--glass-brd);color:var(--text);
  font-size:.84rem;font-weight:400;
  display:flex;align-items:center;justify-content:center;gap:8px;
  transition:.3s var(--ease);
}
.add-to-cart-btn:hover{
  background:linear-gradient(120deg,var(--brass-lt),var(--brass));
  color:var(--ink);border-color:transparent;font-weight:700;
}
.add-to-cart-btn.added{
  background:linear-gradient(120deg,var(--ok),#5c9468);color:var(--ink);border-color:transparent;font-weight:700;
}

@media (max-width:1180px){.products-grid{grid-template-columns:repeat(2,1fr);}}

@media (max-width:1024px){
  .products-page{grid-template-columns:300px 1fr;}
}

/* card gets narrow at 2-columns on phones — the full button label was
   wrapping onto two lines; shrink font/padding so it fits on one line */
@media (max-width:640px){
  .add-to-cart-btn{font-size:.72rem;padding:10px 6px;gap:5px;white-space:nowrap;}
  .add-to-cart-btn i{font-size:.8rem;}
}
@media (max-width:400px){
  .add-to-cart-btn{font-size:.66rem;padding:9px 4px;gap:4px;}
}

.no-products small{color:var(--text-faint);}

.filter-toggle-btn{display:none;}
.filter-close{display:none;}
.filter-scrim{display:none;}

@media (max-width:860px){
  .all-products-container{padding:0 0 15px;}
  .products-page{grid-template-columns:1fr;padding:0 6vw;}
  .products-grid{grid-template-columns:repeat(2,1fr);gap:12px;}

  .products-toolbar{flex-wrap:nowrap;gap:10px;}
  .filter-toggle-btn{
    display:flex;align-items:center;gap:8px;flex-shrink:0;
    padding:11px 16px;border-radius:var(--r-full);
    background:linear-gradient(120deg,var(--brass-lt),var(--brass));
    color:var(--ink);font-weight:700;font-size:.8rem;
    order:-1;
  }
  .product-count{flex:1;font-size:.76rem;}

  .filter-scrim{
    display:block;position:fixed;inset:0;z-index:1400;
    background:rgba(0,0,0,.55);backdrop-filter:blur(2px);
    opacity:0;visibility:hidden;transition:.35s var(--ease);
  }
  .filter-scrim.open{opacity:1;visibility:visible;}

  .filter-sidebar{
    position:fixed;top:0;right:0;left:auto;
    height:100vh;max-height:100vh;width:min(86vw,360px);
    z-index:1500;border-radius:0;
    transform:translateX(102%);
    transition:transform .4s var(--ease);
    overflow-y:auto;
  }
  .filter-sidebar.open{transform:translateX(0);}
  .filter-close{
    display:flex;align-items:center;justify-content:center;
    position:absolute;left:14px;top:14px;
    width:34px;height:34px;border-radius:50%;
    background:var(--glass);border:1px solid var(--glass-brd);
    font-size:.85rem;color:var(--text-dim);
  }
  .filter-sidebar h2{position:relative;}
}

@media (max-width:480px){
  .products-grid{grid-template-columns:1fr;}
}

.products-grid .product-card .image .image-placeholder{min-height:100%;height:100%;}
