/*
Theme Name: Sabay Tinh Men's Fashion
Theme URI: https://example.com/sabaytinh
Author: Sabay Tinh
Description: A clean, responsive WooCommerce theme for a men's clothing store. Includes a category-first homepage for Shirts, Graphic T-Shirts and Hoodies, size selection (S/M/L/XL), Add to Cart, Buy Now, WooCommerce cart/checkout support, starter catalog installer, and responsive mobile navigation.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: sabaytinh
*/
/* =========================================
   SABAY TINH - MEN'S FASHION ECOMMERCE
   ========================================= */

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #111111;
  --muted: #6f6f6f;
  --line: #e8e6df;
  --dark: #141414;
  --soft: #eceae3;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0,0,0,.08);
  --container: 1200px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

img {
  width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

/* Announcement */
.announcement {
  background: var(--dark);
  color: white;
  font-size: 13px;
}

.announcement-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Header */
.site-header {
  background: rgba(247,246,242,.95);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0,0,0,.05);
  backdrop-filter: blur(15px);
}

.nav-wrapper {
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
}

.logo {
  font-weight: 800;
  font-size: 23px;
  letter-spacing: 1.5px;
  justify-self: start;
}

.logo span {
  font-weight: 400;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.desktop-nav a {
  font-size: 14px;
  font-weight: 600;
  transition: .2s ease;
}

.desktop-nav a:hover {
  opacity: .55;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn,
.menu-btn,
.cart-close {
  border: 0;
  background: transparent;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}

.icon-btn:hover {
  background: var(--soft);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.cart-count {
  position: absolute;
  top: 1px;
  right: 1px;
  background: var(--text);
  color: white;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 100px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-btn span {
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: .25s ease;
}

/* Search */
.search-bar {
  display: none;
  border-top: 1px solid var(--line);
  background: white;
}

.search-bar.open {
  display: block;
}

.search-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-inner input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 18px;
  background: transparent;
}

.text-btn {
  border: 0;
  background: transparent;
  font-weight: 700;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  padding: 8px 20px 22px;
  border-top: 1px solid var(--line);
  background: white;
}

.mobile-menu.open {
  display: grid;
}

.mobile-menu a {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

/* Hero */
.hero {
  padding: 34px 0 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  min-height: 650px;
  background: #ebe8df;
  border-radius: 28px;
  overflow: hidden;
}

.hero-content {
  padding: 70px 65px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 2.2px;
  font-weight: 800;
  color: #78766f;
  margin-bottom: 16px;
}

.hero h1,
.section-heading h2,
.promo-box h2,
.about-content h2,
.newsletter h2 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  line-height: 1.04;
}

.hero h1 {
  font-size: clamp(48px, 6vw, 82px);
  max-width: 680px;
}

.hero-text {
  color: #626159;
  max-width: 540px;
  margin: 24px 0 32px;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  font-weight: 700;
  transition: .2s ease;
}

.btn-dark {
  background: var(--dark);
  color: white;
}

.btn-dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,.15);
}

.btn-outline {
  border-color: #bdbbb2;
}

.btn-outline:hover {
  background: white;
}

.btn-light {
  background: white;
  color: var(--dark);
}

.hero-stats {
  margin-top: 55px;
  padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,.12);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  font-size: 17px;
}

.hero-stats span {
  font-size: 12px;
  color: #77756d;
  margin-top: 3px;
}

.hero-visual {
  position: relative;
  min-height: 650px;
}

.hero-visual > img {
  height: 100%;
  object-fit: cover;
}

.floating-card {
  position: absolute;
  left: 24px;
  bottom: 24px;
  width: min(280px, calc(100% - 48px));
  padding: 20px;
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.floating-card span,
.floating-card strong,
.floating-card a {
  display: block;
}

.floating-card span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
}

.floating-card strong {
  font-size: 19px;
  margin: 4px 0 9px;
}

.floating-card a {
  font-size: 13px;
  font-weight: 700;
}

/* Benefits */
.benefits {
  padding-bottom: 30px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.benefits article {
  display: flex;
  gap: 16px;
  padding: 26px 28px;
}

.benefits article + article {
  border-left: 1px solid var(--line);
}

.benefit-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  font-size: 11px;
  font-weight: 800;
}

.benefits h3 {
  font-size: 14px;
  margin-bottom: 3px;
}

.benefits p {
  color: var(--muted);
  font-size: 12px;
}

/* Generic sections */
.section {
  padding: 85px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 34px;
}

.section-heading h2,
.about-content h2,
.newsletter h2 {
  font-size: clamp(34px, 4vw, 52px);
}

.view-link {
  font-size: 14px;
  font-weight: 700;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
}

/* Categories */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card {
  position: relative;
  min-height: 430px;
  border-radius: var(--radius);
  overflow: hidden;
}

.category-card img {
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.category-card:hover img {
  transform: scale(1.04);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.58), transparent 55%);
}

.category-overlay {
  position: absolute;
  left: 22px;
  bottom: 20px;
  z-index: 2;
  color: white;
}

.category-overlay span {
  display: block;
  font-size: 24px;
  font-weight: 700;
}

.category-overlay small {
  opacity: .8;
}

/* Product section */
.products-section {
  background: white;
}

.product-result {
  color: var(--muted);
  font-size: 13px;
}

.product-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 100px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--dark);
  color: white;
  border-color: var(--dark);
}

.sort-select {
  border: 1px solid var(--line);
  background: white;
  border-radius: 100px;
  padding: 10px 38px 10px 16px;
  outline: none;
  color: var(--text);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 16px;
}

.product-card.hidden {
  display: none;
}

.product-image-wrap {
  height: 390px;
  border-radius: 16px;
  overflow: hidden;
  background: #f0eee8;
  position: relative;
}

.product-image-wrap img {
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.035);
}

.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  background: white;
  padding: 7px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.badge-dark {
  background: var(--dark);
  color: white;
}

.quick-add {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  min-height: 46px;
  border: 0;
  border-radius: 100px;
  background: rgba(255,255,255,.95);
  font-weight: 800;
  transform: translateY(80px);
  opacity: 0;
  transition: .25s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

.product-card:hover .quick-add {
  transform: translateY(0);
  opacity: 1;
}

.product-info {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding-top: 14px;
}

.product-category {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.product-info h3 {
  font-size: 15px;
  font-weight: 700;
}

.product-info strong {
  font-size: 15px;
  white-space: nowrap;
}

.empty-state {
  display: none;
  text-align: center;
  padding: 70px 20px;
}

.empty-state.show {
  display: block;
}

/* Promo */
.promo-section {
  padding: 80px 0;
}

.promo-box {
  padding: 60px;
  border-radius: 26px;
  background: #171717;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.eyebrow.light {
  color: #aaa;
}

.promo-box h2 {
  font-size: clamp(38px, 5vw, 64px);
  margin-bottom: 10px;
}

.promo-box p {
  color: #bbb;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 70px;
  align-items: center;
}

.about-image {
  height: 560px;
  overflow: hidden;
  border-radius: 22px;
}

.about-image img {
  height: 100%;
  object-fit: cover;
}

.about-content p:not(.eyebrow) {
  color: var(--muted);
  max-width: 540px;
  margin: 22px 0 28px;
  font-size: 16px;
}

/* Newsletter */
.newsletter {
  padding: 70px 0;
  background: #ebe8df;
}

.newsletter-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 50px;
}

.newsletter h2 {
  max-width: 600px;
}

.newsletter-form {
  width: min(460px, 100%);
  display: flex;
  background: white;
  border-radius: 100px;
  padding: 6px;
  border: 1px solid var(--line);
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 18px;
  background: transparent;
}

/* Footer */
.footer {
  padding: 70px 0 24px;
  background: #0f0f0f;
  color: white;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 45px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 14px;
}

.footer-grid p {
  color: #8f8f8f;
  max-width: 320px;
  font-size: 14px;
}

.footer-grid h4 {
  font-size: 13px;
  margin-bottom: 14px;
}

.footer-grid > div:not(:first-child) a {
  display: block;
  color: #a5a5a5;
  font-size: 13px;
  margin: 9px 0;
}

.footer-grid a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #292929;
  margin-top: 55px;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  color: #747474;
  font-size: 12px;
}

/* Cart */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.42);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
}

.cart-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100vh;
  z-index: 200;
  background: white;
  transform: translateX(105%);
  transition: .3s ease;
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow: -20px 0 50px rgba(0,0,0,.12);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-header {
  padding: 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header .eyebrow {
  margin-bottom: 2px;
}

.cart-header h3 {
  font-size: 24px;
}

.cart-close {
  font-size: 32px;
  line-height: 1;
  width: 42px;
  height: 42px;
}

.cart-items {
  overflow-y: auto;
  padding: 20px 26px;
}

.cart-empty {
  text-align: center;
  padding: 70px 10px;
  color: var(--muted);
}

.cart-empty p {
  color: var(--text);
  font-weight: 700;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item h4 {
  font-size: 14px;
}

.cart-item p {
  color: var(--muted);
  font-size: 13px;
}

.remove-item {
  border: 0;
  background: transparent;
  color: #9a4d4d;
  font-size: 12px;
  font-weight: 700;
}

.cart-footer {
  border-top: 1px solid var(--line);
  padding: 22px 26px 26px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.checkout-btn {
  width: 100%;
}

.cart-footer small {
  display: block;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 30px);
  z-index: 300;
  background: #111;
  color: white;
  padding: 12px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Responsive */
@media (max-width: 1050px) {
  .desktop-nav {
    display: none;
  }

  .menu-btn {
    display: flex;
  }

  .nav-wrapper {
    grid-template-columns: 1fr auto;
  }

  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-content {
    padding: 55px 38px;
  }

  .category-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    gap: 40px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .announcement-inner {
    justify-content: center;
  }

  .announcement-hide-mobile {
    display: none;
  }

  .nav-wrapper {
    min-height: 68px;
  }

  .hero {
    padding-top: 16px;
  }

  .hero-grid {
    display: flex;
    flex-direction: column;
    min-height: auto;
    border-radius: 20px;
  }

  .hero-content {
    padding: 44px 24px 36px;
  }

  .hero h1 {
    font-size: 49px;
  }

  .hero-visual {
    min-height: 500px;
  }

  .hero-stats {
    margin-top: 38px;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .benefits article + article {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .section {
    padding: 65px 0;
  }

  .section-heading,
  .product-toolbar,
  .newsletter-inner,
  .promo-box {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    margin-bottom: 26px;
  }

  .category-grid {
    grid-template-columns: 1fr 1fr;
  }

  .category-card {
    min-height: 330px;
  }

  .product-toolbar {
    display: flex;
  }

  .sort-select {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px 12px;
  }

  .product-image-wrap {
    height: 300px;
  }

  .quick-add {
    transform: none;
    opacity: 1;
    min-height: 42px;
  }

  .product-info {
    display: block;
  }

  .product-info strong {
    display: block;
    margin-top: 4px;
  }

  .promo-box {
    padding: 38px 28px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    height: 430px;
  }

  .newsletter-form {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .header-actions {
    gap: 2px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-visual {
    min-height: 420px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 420px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-image-wrap {
    height: 460px;
  }

  .newsletter-form {
    border-radius: 16px;
    padding: 8px;
    flex-direction: column;
    gap: 8px;
  }

  .newsletter-form input {
    min-height: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: auto;
  }
}

/* =========================================
   WORDPRESS + WOOCOMMERCE INTEGRATION
   ========================================= */
.admin-bar .site-header { top: 32px; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { max-height: 56px; width: auto; }
.footer .custom-logo { max-height: 52px; filter: brightness(0) invert(1); }
.desktop-nav .menu-item,
.mobile-menu .menu-item { list-style: none; }
.desktop-nav > li { display: inline-flex; }
.mobile-menu > li { list-style: none; }
.mobile-menu > li > a { display: block; padding: 13px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.wp-search-form { flex: 1; display: flex; }
.wp-search-form input[type="search"] { width: 100%; border: 0; outline: none; background: transparent; font-size: 18px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.notice-box { grid-column: 1 / -1; padding: 28px; border: 1px dashed var(--line); background: var(--surface); border-radius: var(--radius); color: var(--muted); }
.content-area { max-width: 960px; }
.content-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; margin-bottom: 24px; }
.content-card h1 { margin-bottom: 18px; }
.entry-content > * + * { margin-top: 1em; }
.product-card .price del { color: var(--muted); font-weight: 500; margin-right: 6px; }
.product-card .price ins { text-decoration: none; }
.product-category a { color: inherit; }
.quick-add.button { text-align: center; color: var(--text); line-height: 46px; padding: 0 16px; }
.woocommerce-page-wrap { background: white; }
.woocommerce .woocommerce-breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 25px; }
.woocommerce ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 16px; margin: 0; }
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; }
.woocommerce ul.products li.product a img { border-radius: 16px; margin-bottom: 14px; aspect-ratio: 4 / 5; object-fit: cover; background: #f0eee8; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 15px; font-weight: 700; padding: 0; }
.woocommerce ul.products li.product .price { color: var(--text); font-weight: 700; font-size: 15px; }
.woocommerce ul.products li.product .button,
.woocommerce div.product form.cart .button,
.woocommerce .cart .button,
.woocommerce .cart input.button,
.woocommerce #payment #place_order,
.woocommerce-page #payment #place_order {
  background: var(--dark); color: white; border-radius: 100px; padding: 14px 22px; font-weight: 700;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce div.product form.cart .button:hover { background: #333; color: white; }
.woocommerce span.onsale { background: var(--dark); min-width: auto; min-height: auto; line-height: 1; padding: 8px 10px; border-radius: 100px; font-size: 11px; }
.woocommerce div.product div.images img { border-radius: 18px; }
.woocommerce div.product .product_title { font-family: "Playfair Display", serif; font-size: clamp(34px, 4vw, 52px); }
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: var(--text); font-weight: 700; }
.woocommerce-message,
.woocommerce-info,
.woocommerce-error { border-top-color: var(--dark); background: #f7f6f2; }
.woocommerce-message::before,
.woocommerce-info::before { color: var(--dark); }
.woocommerce table.shop_table { border-color: var(--line); border-radius: 14px; }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce select { border: 1px solid var(--line); padding: 12px 14px; border-radius: 10px; }

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
@media (max-width: 1050px) {
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .woocommerce ul.products { grid-template-columns: 1fr; }
}

/* =========================================================
   HOMEPAGE COLLECTION LAYOUT - v1.2
   ========================================================= */
.home-categories {
  padding-top: 72px;
  padding-bottom: 84px;
}

.compact-heading {
  align-items: flex-end;
}

.home-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-category-card {
  min-height: 470px;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #e9e7e0;
  isolation: isolate;
}

.home-category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.8,.2,1);
}

.home-category-card:hover img {
  transform: scale(1.045);
}

.home-category-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(10,10,10,.72) 0%, rgba(10,10,10,.18) 48%, rgba(10,10,10,0) 72%);
}

.home-category-copy {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 24px;
  z-index: 2;
  color: #fff;
}

.home-category-copy small,
.home-category-copy strong,
.home-category-copy em {
  display: block;
}

.home-category-copy small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: .72;
  margin-bottom: 4px;
}

.home-category-copy strong {
  font-family: "Playfair Display", serif;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.05;
}

.home-category-copy em {
  margin-top: 10px;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.home-collections {
  background: #fff;
}

.collection-section {
  padding: 92px 0;
  scroll-margin-top: 110px;
}

.collection-section.collection-tint {
  background: #f3f1eb;
}

.collection-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}

.collection-heading h2 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.05;
}

.collection-subtitle {
  margin-top: 10px;
  color: var(--muted);
  max-width: 540px;
}

.home-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px 18px;
}

.home-product-card {
  min-width: 0;
}

.home-product-image-wrap,
.home-product-image {
  position: relative;
  display: block;
}

.home-product-image-wrap {
  overflow: hidden;
  border-radius: 18px;
  background: #f4f3ef;
}

.home-product-image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f4f3ef;
}

.home-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}

.home-product-card:hover .home-product-image img {
  transform: scale(1.035);
}

.home-sale-badge,
.demo-label {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .75px;
}

.demo-label {
  background: rgba(255,255,255,.92);
  color: #111;
}

.home-add-cart {
  position: absolute !important;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  min-height: 46px;
  padding: 12px 16px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.95) !important;
  color: #111 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-align: center;
  line-height: 1.2 !important;
  transform: translateY(70px);
  opacity: 0;
  transition: .25s ease;
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
}

.home-product-card:hover .home-add-cart {
  transform: translateY(0);
  opacity: 1;
}

.home-product-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
}

.home-product-info h3 {
  margin: 3px 0 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

.home-product-info strong {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
}

.home-product-info strong del {
  color: #999;
  margin-right: 5px;
  font-weight: 500;
}

.home-product-info strong ins {
  text-decoration: none;
}

.homepage-admin-note {
  margin-top: 20px;
  padding: 12px 15px;
  border: 1px dashed #c9c6bd;
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  color: #666;
  font-size: 12px;
}

.home-demo-grid .home-product-image {
  border-radius: 18px;
}

/* Keep WooCommerce's default ul.products styling from affecting our homepage grid. */
.home-product-grid::before,
.home-product-grid::after {
  display: none !important;
  content: none !important;
}

@media (max-width: 1050px) {
  .home-category-card {
    min-height: 400px;
  }
  .home-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .home-category-grid {
    grid-template-columns: 1fr;
  }
  .home-category-card {
    min-height: 440px;
  }
  .collection-section {
    padding: 68px 0;
  }
  .collection-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 26px;
  }
  .home-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 12px;
  }
  .home-add-cart {
    position: static !important;
    margin: 10px 10px 10px;
    width: calc(100% - 20px);
    transform: none;
    opacity: 1;
    box-shadow: none;
    border: 1px solid #e1dfd8 !important;
  }
}

@media (max-width: 480px) {
  .home-category-card {
    min-height: 400px;
  }
  .home-product-grid {
    grid-template-columns: 1fr 1fr;
  }
  .home-product-info {
    display: block;
  }
  .home-product-info strong {
    display: block;
    margin-top: 5px;
  }
  .home-product-info h3 {
    font-size: 13px;
  }
}

/* =========================================
   v1.3 QUICK BUY + SIZE SELECTOR
   ========================================= */
.sabay-home-notices {
  padding-top: 18px;
}

.sabay-home-notices .woocommerce-message,
.sabay-home-notices .woocommerce-error,
.sabay-home-notices .woocommerce-info {
  margin: 0 0 18px !important;
  border-radius: 14px;
  border-top: 0 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
}

.home-quick-buy {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.home-size-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.home-size-label,
.sabay-size-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
}

.home-size-options,
.sabay-size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.home-size-chip,
.sabay-size-chip {
  position: relative;
  cursor: pointer;
}

.home-size-chip input,
.sabay-size-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.home-size-chip span,
.sabay-size-chip span {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dcd9d1;
  border-radius: 9px;
  background: #fff;
  color: #222;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  transition: .18s ease;
}

.home-size-chip:hover span,
.sabay-size-chip:hover span {
  border-color: #111;
}

.home-size-chip input:checked + span,
.sabay-size-chip input:checked + span {
  border-color: #111;
  background: #111;
  color: #fff;
  box-shadow: 0 5px 14px rgba(0,0,0,.12);
}

.home-size-chip input:focus-visible + span,
.sabay-size-chip input:focus-visible + span {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.home-purchase-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.home-cart-btn,
.home-buy-now-btn {
  min-height: 42px;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.home-cart-btn {
  border: 1px solid #171717;
  background: #fff;
  color: #171717;
}

.home-buy-now-btn {
  border: 1px solid #171717;
  background: #171717;
  color: #fff;
}

.home-cart-btn:hover,
.home-buy-now-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(0,0,0,.10);
}

.home-cart-btn:hover {
  background: #f3f2ee;
}

.home-buy-now-btn:hover {
  background: #000;
}

.home-options-link {
  margin-top: 12px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #171717;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
}

/* Single WooCommerce product page */
.sabay-single-size-picker {
  clear: both;
  margin: 16px 0 14px;
}

.sabay-single-size-picker .sabay-size-title {
  display: block;
  margin-bottom: 8px;
}

.sabay-single-size-picker .sabay-size-chip span {
  min-width: 42px;
  height: 40px;
  border-radius: 10px;
}

.single-product div.product form.cart .sabay-single-buy-now {
  margin-left: 8px !important;
  background: #111 !important;
  color: #fff !important;
  border-radius: 10px !important;
}

.single-product div.product form.cart .single_add_to_cart_button {
  border-radius: 10px !important;
}

/* The old hover-only quick add is replaced by the always-visible v1.3 form. */
.home-product-card .home-add-cart {
  display: none !important;
}

@media (max-width: 760px) {
  .home-size-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-size-options {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .home-size-chip span {
    width: 100%;
    min-width: 0;
  }

  .home-purchase-actions {
    grid-template-columns: 1fr;
  }

  .home-cart-btn,
  .home-buy-now-btn {
    min-height: 40px;
  }
}

@media (max-width: 480px) {
  .home-quick-buy {
    margin-top: 10px;
    padding-top: 10px;
  }

  .home-size-label {
    font-size: 9px;
  }

  .home-size-options {
    gap: 4px;
  }

  .home-size-chip span {
    height: 30px;
    padding: 0 4px;
    border-radius: 7px;
    font-size: 10px;
  }

  .home-cart-btn,
  .home-buy-now-btn {
    min-height: 38px;
    padding: 8px 5px;
    font-size: 10px;
    border-radius: 8px;
  }

  .single-product div.product form.cart .sabay-single-buy-now {
    margin: 8px 0 0 !important;
  }
}


/* =========================================
   v1.4 SHOP GRID QUICK BUY
   ========================================= */
.woocommerce ul.products li.product {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.woocommerce ul.products li.product > a.woocommerce-LoopProduct-link {
  display: block;
}

.sabay-loop-quick-buy {
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.sabay-loop-size-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.sabay-loop-size-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .75px;
}

.sabay-loop-size-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.sabay-loop-size-chip {
  position: relative;
  cursor: pointer;
}

.sabay-loop-size-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sabay-loop-size-chip span {
  width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9d7d0;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 10px;
  font-weight: 800;
  transition: .18s ease;
}

.sabay-loop-size-chip:hover span,
.sabay-loop-size-chip input:checked + span {
  border-color: #111;
}

.sabay-loop-size-chip input:checked + span {
  background: #111;
  color: #fff;
}

.sabay-loop-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.woocommerce ul.products li.product .sabay-loop-actions .button {
  width: 100%;
  min-height: 42px;
  margin: 0 !important;
  padding: 10px 8px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #111 !important;
  border-radius: 10px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  text-align: center;
}

.woocommerce ul.products li.product .sabay-loop-cart-btn {
  background: #fff !important;
  color: #111 !important;
}

.woocommerce ul.products li.product .sabay-loop-buy-btn {
  background: #111 !important;
  color: #fff !important;
}

.woocommerce ul.products li.product .sabay-loop-cart-btn:hover {
  background: #f2f1ed !important;
}

.woocommerce ul.products li.product .sabay-loop-buy-btn:hover {
  background: #000 !important;
}

@media (max-width: 760px) {
  .sabay-loop-size-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .sabay-loop-size-options {
    justify-content: flex-start;
  }
}

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