/*
 * Layout and image correction layer.
 * Loaded last so it safely fixes alignment without removing the PDF functions.
 */

/* ---------- Global desktop rhythm ---------- */
:root{--container:1240px}
body{overflow-x:hidden}
.container{width:100%;max-width:var(--container);padding-left:24px;padding-right:24px}
.section{padding-top:72px;padding-bottom:72px}
.section.compact{padding-top:56px;padding-bottom:56px}
.section-title{margin-bottom:44px}
.section-title .kicker{font-size:13px;line-height:1.4;letter-spacing:.18em}
.section-title h2{font-size:clamp(34px,3vw,44px);margin:8px 0 13px}

/* ---------- Header: keep every item on one aligned row ---------- */
.navbar{height:90px}
.nav-inner{
  height:90px;
  display:grid;
  grid-template-columns:210px minmax(0,1fr) 230px;
  column-gap:24px;
  align-items:center;
}
.logo-image{width:180px;max-width:100%;height:62px;justify-content:flex-start}
.logo-image img{width:180px;height:60px;object-fit:contain;object-position:left center}
.nav-menu{
  min-width:0;
  height:90px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(20px,2vw,34px);
  white-space:nowrap;
  flex-wrap:nowrap;
  font-size:14px;
}
.nav-menu>a,
.nav-shop-wrap,
.nav-shop-wrap>a{height:90px;display:flex;align-items:center}
.nav-shop-wrap{position:relative}
.nav-actions{min-width:0;gap:16px;white-space:nowrap}
.user-pill{max-width:100px;overflow:hidden}
.user-pill span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mega-menu{top:90px}

/* ---------- Hero: preserve artwork ratio instead of vertically stretching it ---------- */
.hero-slider,
.editable-hero{
  height:clamp(520px,42.71vw,820px);
  min-height:520px;
  max-height:calc(100vh - 128px);
}
.hero-slider .hero-img,
.editable-hero .hero-img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
}
.hero-copy{padding-left:max(calc((100vw - 1240px)/2 + 24px),7.5vw);padding-right:24px}
.hero-copy p{font-size:clamp(12px,1.05vw,17px)}
.hero-copy h1{font-size:clamp(46px,4.7vw,82px);max-width:680px}
.hero-arrow{top:50%}

/* ---------- Three service panels: clean images and matching alignment ---------- */
.home-service-tiles{padding-top:54px;padding-bottom:54px}
.category-grid{gap:24px}
.category-grid-overlay .category-tile{
  height:auto;
  aspect-ratio:39/50;
  background:#0d0d0d;
  box-shadow:0 10px 26px rgba(0,0,0,.09);
}
.category-grid-overlay .category-tile img{
  width:100%;height:100%;object-fit:cover;object-position:center;
}
.category-grid-overlay .category-tile:after{
  background:linear-gradient(180deg,rgba(0,0,0,.02) 35%,rgba(0,0,0,.82) 100%);
}
.category-grid-overlay .category-tile span{left:28px;right:28px;bottom:28px}
.category-grid-overlay .category-tile small{font-size:11px;letter-spacing:.15em}
.category-grid-overlay .category-tile strong{font-size:clamp(22px,2.1vw,31px);line-height:1.02}

/* ---------- Product cards: equal heights, no image cropping, clean metadata ---------- */
.product-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:48px 28px;
  align-items:stretch;
}
.product-card{display:flex;min-width:0;flex-direction:column;height:100%}
.product-card .image{
  width:100%;
  aspect-ratio:280/330;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f7f7f7;
  overflow:hidden;
}
.product-card .image img{
  width:100%;height:100%;object-fit:contain;object-position:center;
  transition:transform .35s ease;
}
.product-card:hover .image img{transform:scale(1.025)}
.product-card-body{display:flex;flex:1;flex-direction:column;padding-top:14px}
.product-name-row{min-height:44px}
.product-name-row h3{font-size:16px;line-height:1.28;margin:0}
.product-meta-line{min-height:34px;margin-top:8px;align-items:flex-start}
.product-category,.product-studio{max-width:48%;overflow-wrap:anywhere}
.product-price-row{margin-top:auto;padding-top:8px;min-height:30px}
.product-price-row .price{font-size:13px}
.product-price-row .points{font-size:11px;text-align:right}
.badge-stack{left:9px;top:9px;max-width:calc(100% - 18px)}
.product-badge{font-size:9px;padding:4px 7px}
.sold-stamp{font-size:clamp(15px,1.35vw,22px);max-width:90%;text-align:center}
.home-product-tabs{margin-top:-10px;margin-bottom:38px;gap:26px}

/* ---------- Studio showcase: image already contains its studio title ---------- */
.studio-card-label{display:none!important}
.studio-grid-full{grid-template-columns:repeat(4,minmax(0,1fr))}
.studio-card{height:auto;aspect-ratio:9/10}
.studio-card img{object-fit:cover;object-position:center}

/* ---------- Brand logos ---------- */
.brand-logo-section{padding-top:62px;padding-bottom:66px}
.brand-logo-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:40px 58px}
.brand-logo{height:104px;padding:10px}
.brand-logo img{max-width:160px;max-height:92px;object-fit:contain}

/* ---------- Why choose and reviews ---------- */
.why-feature-row{align-items:stretch}
.why-feature-row .feature{display:flex;flex-direction:column;align-items:center;padding:0 16px}
.why-feature-row .feature b{min-height:48px;display:flex;align-items:center;justify-content:center}
.why-feature-row .feature span{max-width:205px}
.collector-review-grid{align-items:stretch}
.collector-review{height:100%;grid-template-columns:145px minmax(0,1fr)}
.collector-review>img{width:145px;min-height:178px;height:100%;object-fit:cover}
.collector-review>div{min-width:0}
.review-top strong{overflow-wrap:anywhere}

/* ---------- All inner-page images ---------- */
.page-banner{overflow:hidden}
.page-banner img{object-fit:cover;object-position:center}
.product-main-img{display:block;object-fit:contain;background:#fff}

/* ---------- Laptop / small desktop ---------- */
@media (max-width:1180px){
  .nav-inner{grid-template-columns:175px minmax(0,1fr) 205px;column-gap:14px}
  .logo-image,.logo-image img{width:155px}
  .nav-menu{gap:16px;font-size:13px}
  .nav-actions{gap:12px}
  .user-pill span{display:none}
  .product-grid{gap:42px 22px}
  .brand-logo-grid{gap:34px 36px}
}

/* Use the mobile menu before desktop navigation becomes cramped. */
@media (max-width:940px){
  .topbar{display:none}
  .navbar,.nav-inner{height:auto;min-height:76px}
  .navbar{position:relative}
  .nav-inner{display:flex;justify-content:space-between;gap:16px;padding-top:10px;padding-bottom:10px}
  .logo-image,.logo-image img{width:150px;height:54px}
  .mobile-menu{display:block;margin-left:auto}
  .nav-menu{
    position:absolute;left:0;right:0;top:76px;height:auto;background:#fff;
    display:none;align-items:stretch;flex-direction:column;gap:0;padding:14px 24px 22px;
    border-top:1px solid #eee;box-shadow:0 16px 28px rgba(0,0,0,.08);z-index:30;
  }
  .nav-menu.open{display:flex}
  .nav-menu>a,.nav-shop-wrap,.nav-shop-wrap>a{height:auto;min-height:45px}
  .nav-shop-wrap{display:block}
  .nav-actions{margin-left:4px}
  .user-pill{display:none}
  .mega-menu{position:static;transform:none;width:100%;display:none;grid-template-columns:1fr;opacity:1;visibility:visible;pointer-events:auto;box-shadow:none;padding:16px;margin:0 0 8px}
  .nav-shop-wrap:hover .mega-menu,.nav-shop-wrap:focus-within .mega-menu{display:grid}
  .mega-column{padding:12px 0;border-right:0;border-bottom:1px solid #333}
  .mega-column:last-child{border-bottom:0}
  .hero-slider,.editable-hero{height:clamp(440px,58vw,560px);min-height:440px;max-height:none}
  .hero-copy h1{font-size:clamp(42px,7vw,60px)}
  .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .studio-grid-full{grid-template-columns:repeat(2,minmax(0,1fr))}
  .brand-logo-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .feature-row{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:28px}
}

@media (max-width:680px){
  .container{padding-left:18px;padding-right:18px}
  .nav-inner{padding-left:18px;padding-right:18px}
  .logo-image,.logo-image img{width:132px}
  .nav-actions{gap:10px}
  .hero-slider,.editable-hero{height:430px;min-height:430px}
  .hero-slider .hero-img,.editable-hero .hero-img{object-position:62% center}
  .hero-copy{padding-left:28px;padding-right:48px}
  .hero-copy h1{font-size:40px;max-width:330px}
  .hero-copy p{font-size:10px}
  .hero-line{margin:16px 0 23px}
  .hero-cta{min-width:145px;padding:11px 20px}
  .home-service-tiles{padding-top:34px;padding-bottom:34px}
  .category-grid{grid-template-columns:1fr;gap:18px}
  .category-grid-overlay .category-tile{aspect-ratio:4/5}
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:34px 14px}
  .product-name-row{min-height:54px}
  .product-meta-line{display:block;min-height:48px}
  .product-category,.product-studio{display:block;max-width:none;text-align:left;margin-bottom:3px}
  .product-price-row{display:block}
  .product-price-row .points{display:block;text-align:left;margin-top:2px}
  .home-product-tabs{justify-content:flex-start;overflow-x:auto;gap:14px}
  .studio-grid-full{grid-template-columns:1fr}
  .studio-card{aspect-ratio:9/10}
  .brand-logo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 20px}
  .feature-row{grid-template-columns:1fr}
  .collector-review{grid-template-columns:100px minmax(0,1fr)}
  .collector-review>img{width:100px}
  .collector-review>div{padding:15px}
}
