/* ===== Reset & Base ===== */

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

:root {
  --color-primary: #217346;       /* Excel green */
  --color-primary-dark: #185a34;
  --color-accent: #f59e0b;
  --color-text: #1a1a1a;
  --color-text-muted: #6b7280;
  --color-bg: #ffffff;
  --color-bg-soft: #f9fafb;
  --color-border: #e5e7eb;
  --color-danger: #ef4444;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: var(--font-body);
  --container: 1120px;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --transition: 0.2s ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; height: 100%; }
body { font-family: var(--font-body); color: var(--color-text); background: var(--color-bg); line-height: 1.6; display: flex; flex-direction: column; min-height: 100%; }
.main { flex: 1; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== Container ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn--outline { border-color: var(--color-primary); color: var(--color-primary); background: transparent; }
.btn--outline:hover { background: var(--color-primary); color: #fff; }
.btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ===== Header ===== */
.header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}
.header__logo {
  font-size: 1.25rem;
  color: var(--color-text);
  white-space: nowrap;
}
.header__logo:hover { color: var(--color-text); }
.header__logo-dot { color: var(--color-primary); }
.header__nav { display: flex; gap: 1.5rem; }
.header__nav a { color: var(--color-text-muted); font-size: 0.9rem; font-weight: 500; }
.header__nav a:hover { color: var(--color-primary); }
.header__actions { display: flex; gap: 1rem; align-items: center; }
.header__icon { color: var(--color-text-muted); position: relative; }
.header__icon:hover { color: var(--color-primary); }
.header__cart-count {
  position: absolute;
  top: -6px; right: -8px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--color-bg-soft) 0%, #e8f5e9 100%);
  padding: 5rem 0;
  text-align: center;
}
.hero h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.hero__subtitle { font-size: 1.15rem; color: var(--color-text-muted); margin-bottom: 1.5rem; max-width: 500px; margin-left: auto; margin-right: auto; }
.hero__stats {
  display: flex; align-items: center; justify-content: center;
  gap: 0.75rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.hero__stat { font-size: 0.9rem; font-weight: 600; color: var(--color-primary); }
.hero__stat-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--color-text-muted); }

/* ===== Categories ===== */
.categories { padding: 4rem 0; }
.categories h2 { text-align: center; margin-bottom: 2rem; }
.categories__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.categories__card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border); border-radius: var(--radius);
  color: var(--color-text);
  transition: all var(--transition);
}
.categories__card:hover {
  border-color: var(--color-primary); color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.categories__title { font-weight: 600; font-size: 0.9rem; }
.categories__count { font-size: 0.8rem; color: var(--color-text-muted); }

/* ===== Product Grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* ===== Product Card ===== */
.product-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card__link { display: block; color: inherit; }
.product-card__image { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.product-card__no-image {
  width: 100%; aspect-ratio: 4/3;
  background: var(--color-bg-soft);
  display: flex; align-items: center; justify-content: center;
}
.product-card__body { padding: 1rem 1.25rem 1.25rem; }
.product-card__title { font-size: 1rem; font-weight: 600; margin-bottom: 0.35rem; line-height: 1.35; }
.product-card__desc { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.75rem; }
.product-card__price { display: flex; align-items: center; gap: 0.5rem; }
.product-card__price-current { font-size: 1.1rem; font-weight: 700; color: var(--color-primary); }
.product-card__price-old { font-size: 0.9rem; color: var(--color-text-muted); text-decoration: line-through; }

/* ===== Product Page ===== */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin: 2rem 0; }
.product__gallery { display: flex; flex-direction: column; gap: 0.75rem; }
.product__gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-bg-soft);
}
.product__image {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: none;
}
.product__image--active { display: block; }
.product__thumbs { display: flex; gap: 0.5rem; }
.product__thumb {
  width: 72px; height: 54px; object-fit: cover;
  border-radius: 4px; border: 2px solid transparent;
  cursor: pointer; opacity: 0.6; transition: all var(--transition);
}
.product__thumb--active, .product__thumb:hover { border-color: var(--color-primary); opacity: 1; }
.product__title { font-size: 1.75rem; font-weight: 800; margin-bottom: 1rem; }
.product__price { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.product__price-current { font-size: 1.5rem; font-weight: 800; color: var(--color-primary); }
.product__price-old { font-size: 1.1rem; color: var(--color-text-muted); text-decoration: line-through; }
.product__discount {
  background: var(--color-danger);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}
.product__short-desc { color: var(--color-text-muted); margin-bottom: 1.5rem; line-height: 1.5; }
.product__form { margin-bottom: 1.5rem; }
.product__buy { width: 100%; }
.product__perks { margin-top: 0; }
.product__perks li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.product__perks li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}
.product__description {
  margin: 3rem 0;
  line-height: 1.7;
}
.product__description h2,
.product__description h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.product__description ul { padding-left: 1.25rem; list-style: disc; }
.product__description li { margin-bottom: 0.25rem; }

/* ===== Benefits ===== */
.benefits { padding: 4rem 0; background: var(--color-bg-soft); }
.benefits h2 { text-align: center; margin-bottom: 2.5rem; }
.benefits__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.benefit { text-align: center; }
.benefit__icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.benefit h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.benefit p { font-size: 0.9rem; color: var(--color-text-muted); }

/* ===== Featured ===== */
.featured { padding: 4rem 0; }
.featured h2 { text-align: center; margin-bottom: 0.5rem; }
.featured__more { text-align: center; margin-top: 2rem; }

/* ===== Breadcrumbs ===== */
.breadcrumbs { font-size: 0.85rem; color: var(--color-text-muted); padding: 1rem 0; }
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs__sep { margin: 0 0.35rem; }

/* ===== Cart ===== */
.cart__items { margin: 2rem 0; }
.cart__item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}
.cart__item-image { width: 80px; height: 60px; object-fit: cover; border-radius: 4px; }
.cart__item-info { flex: 1; min-width: 0; }
.cart__item-title { font-weight: 600; color: var(--color-text); display: block; }
.cart__item-qty { text-align: center; min-width: 120px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.qty-control__btn {
  width: 32px; height: 32px;
  border: none; background: var(--color-bg-soft);
  font-size: 1rem; cursor: pointer; color: var(--color-text);
  display: flex; align-items: center; justify-content: center;
}
.qty-control__btn:hover { background: var(--color-border); }
.qty-control__input {
  width: 40px; height: 32px;
  border: none; border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border);
  text-align: center; font-size: 0.9rem; font-weight: 600;
  -moz-appearance: textfield;
}
.qty-control__input::-webkit-outer-spin-button,
.qty-control__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart__item-unit-price { display: block; font-size: 0.8rem; color: var(--color-text-muted); }
.cart__item-total { font-weight: 700; color: var(--color-primary); min-width: 90px; text-align: right; }
.cart__item-remove { color: var(--color-text-muted); font-size: 1.5rem; line-height: 1; margin-left: 0.5rem; }
.cart__item-remove:hover { color: var(--color-danger); }
.cart__summary { margin-top: 2rem; text-align: right; }
.cart__total { font-size: 1.25rem; margin-bottom: 1rem; }
.cart__total strong { color: var(--color-primary); }

/* ===== Search ===== */
.search-form { display: flex; gap: 0.75rem; margin: 1.5rem 0; max-width: 500px; }
.search-form__input {
  flex: 1; padding: 0.75rem 1rem;
  border: 1px solid var(--color-border); border-radius: var(--radius);
  font-size: 1rem;
}
.search-form__input:focus { outline: none; border-color: var(--color-primary); }

/* ===== Blog ===== */
.blog__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.blog__card {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.blog__card-title { font-size: 1.1rem; margin-bottom: 0.35rem; }
.blog__card-title a { color: var(--color-text); }
.blog__card-title a:hover { color: var(--color-primary); }
.blog__card-date { font-size: 0.8rem; color: var(--color-text-muted); }
.blog__card-excerpt { margin-top: 0.5rem; font-size: 0.9rem; color: var(--color-text-muted); }

/* ===== Article ===== */
.article { margin: 2rem 0; }
.article h1 { margin-bottom: 0.5rem; }
.article__date { font-size: 0.85rem; color: var(--color-text-muted); display: block; margin-bottom: 2rem; }
.article__content { line-height: 1.7; }
.article__content h2,
.article__content h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.article__content p { margin-bottom: 1rem; }

/* ===== Page ===== */
.page__content { margin: 2rem 0; line-height: 1.7; }
.page__content h2 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.page__content p { margin-bottom: 1rem; }

/* ===== Collection ===== */
.collection__description { color: var(--color-text-muted); margin-bottom: 1rem; }

/* ===== Empty State ===== */
.empty-state { text-align: center; padding: 3rem 0; color: var(--color-text-muted); }
.empty-state .btn { margin-top: 1rem; }

/* ===== Footer ===== */
.footer { background: #1a1a1a; color: #d1d5db; padding: 3rem 0 0; margin-top: auto; }
.footer a { color: #d1d5db; }
.footer a:hover { color: #fff; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer__brand p { margin-top: 0.5rem; font-size: 0.9rem; color: #9ca3af; }
.footer__links h4 { font-size: 0.9rem; color: #fff; margin-bottom: 0.75rem; }
.footer__links li { margin-bottom: 0.4rem; }
.footer__links a { font-size: 0.85rem; }
.footer__payments { display: flex; gap: 0.5rem; margin-top: 1rem; }
.footer__contact-link { display: flex; align-items: center; gap: 0.4rem; }
.footer__bottom { margin-top: 2rem; padding: 1.25rem 0; border-top: 1px solid #333; }
.footer__bottom p { font-size: 0.8rem; color: #6b7280; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin: 2rem 0; flex-wrap: wrap; }
.pagination__link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 0.5rem;
  border: 1px solid var(--color-border); border-radius: var(--radius);
  font-size: 0.9rem; color: var(--color-text);
}
.pagination__link:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination__current {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 0.5rem;
  background: var(--color-primary); color: #fff;
  border-radius: var(--radius); font-size: 0.9rem; font-weight: 600;
}

/* ===== Collection Subcategories ===== */
.collection__subs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.collection__sub-link {
  padding: 0.4rem 1rem;
  border: 1px solid var(--color-border); border-radius: 20px;
  font-size: 0.85rem; color: var(--color-text-muted);
}
.collection__sub-link:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ===== Coupon ===== */
.cart__coupon { display: flex; gap: 0.5rem; margin: 1rem 0; align-items: center; flex-wrap: wrap; }
.cart__coupon form { display: flex; gap: 0.5rem; }
.cart__coupon-input { padding: 0.5rem 0.75rem; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 0.9rem; }
.cart__coupon-error { color: var(--color-danger); font-size: 0.85rem; }
.cart__discounts { margin: 0.5rem 0; }
.cart__discount { font-size: 0.9rem; color: var(--color-primary); }
.cart__item-sku { display: block; font-size: 0.8rem; color: var(--color-text-muted); }

/* ===== Reviews ===== */
.product__reviews { margin: 3rem 0; }
.product__reviews h2 { margin-bottom: 1.5rem; }
.review { padding: 1rem 0; border-bottom: 1px solid var(--color-border); }
.review__author { display: inline; }
.review__date { font-size: 0.8rem; color: var(--color-text-muted); margin-left: 0.5rem; }
.review__content { margin-top: 0.5rem; line-height: 1.5; }

/* ===== Search Count ===== */
.search__count { color: var(--color-text-muted); margin-bottom: 0.5rem; }

/* ===== Active Nav ===== */
.header__nav-active { color: var(--color-primary) !important; font-weight: 600; }

/* ===== Hamburger Button ===== */
.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
}
.header__burger span {
  display: block;
  width: 100%; height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}
.header__burger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger--open span:nth-child(2) { opacity: 0; }
.header__burger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Mobile Nav ===== */
.header__mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 1rem 1.5rem 1.5rem;
}
.header__mobile-nav a {
  padding: 0.75rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}
.header__mobile-nav a:last-child { border-bottom: none; }
.header__mobile-nav a:hover,
.header__mobile-nav .header__nav-active { color: var(--color-primary); }
.header__mobile-nav--open { display: flex; }

/* ===== Live Search ===== */
.header__search {
  display: none;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 1rem 0;
  box-shadow: var(--shadow-md);
}
.header__search--open { display: block; }
.header__search-form { display: flex; gap: 0.5rem; align-items: center; }
.header__search-input {
  flex: 1; padding: 0.75rem 1rem;
  border: 1px solid var(--color-border); border-radius: var(--radius);
  font-size: 1rem;
}
.header__search-input:focus { outline: none; border-color: var(--color-primary); }
.header__search-close {
  background: none; border: none;
  font-size: 1.5rem; color: var(--color-text-muted);
  cursor: pointer; padding: 0 0.5rem; line-height: 1;
}
.header__search-close:hover { color: var(--color-text); }
.header__search-results { margin-top: 0.5rem; }
.header__search-results:empty { display: none; }
.search-result-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { color: var(--color-primary); }
.search-result-item img { width: 48px; height: 36px; object-fit: cover; border-radius: 4px; }
.search-result-item__info { flex: 1; min-width: 0; }
.search-result-item__title { font-size: 0.9rem; font-weight: 500; }
.search-result-item__price { font-size: 0.85rem; color: var(--color-primary); font-weight: 600; }
.header__search-toggle { background: none; border: none; cursor: pointer; padding: 0; }

/* ===== Sort Controls ===== */
.collection__controls {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.75rem;
}
.collection__sort { display: flex; align-items: center; gap: 0.5rem; }
.collection__sort label { font-size: 0.85rem; color: var(--color-text-muted); white-space: nowrap; }
.collection__sort select {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--color-border); border-radius: var(--radius);
  font-size: 0.85rem; background: var(--color-bg);
  cursor: pointer;
}
.collection__sort select:focus { outline: none; border-color: var(--color-primary); }
.collection__count { font-size: 0.85rem; color: var(--color-text-muted); }

/* ===== Product Card Enhancements ===== */
.product-card { position: relative; }
.product-card__badges {
  position: absolute; top: 0.5rem; left: 0.5rem; right: 0.5rem;
  display: flex; justify-content: space-between; z-index: 1;
  pointer-events: none;
}
.product-card__badge {
  font-size: 0.7rem; font-weight: 600;
  padding: 0.2rem 0.5rem; border-radius: 4px;
  line-height: 1.3;
}
.product-card__badge--category { background: rgba(33,115,70,0.9); color: #fff; }
.product-card__badge--discount { background: var(--color-danger); color: #fff; }
.product-card__badge--new { background: var(--color-accent); color: #fff; }

/* ===== Related Products ===== */
.related { margin: 3rem 0; }
.related h2 { margin-bottom: 1.5rem; }

/* ===== FAQ ===== */
.faq { padding: 4rem 0; }
.faq h2 { text-align: center; margin-bottom: 2rem; }
.faq__list { max-width: 720px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--color-border); }
.faq__question {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 1rem 0;
  background: none; border: none;
  font-size: 1rem; font-weight: 600; color: var(--color-text);
  cursor: pointer; text-align: left;
}
.faq__question:hover { color: var(--color-primary); }
.faq__arrow {
  transition: transform var(--transition);
  flex-shrink: 0; margin-left: 1rem;
}
.faq__item--open .faq__arrow { transform: rotate(180deg); }
.faq__answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq__answer-inner {
  padding: 0 0 1rem;
  font-size: 0.9rem; color: var(--color-text-muted);
  line-height: 1.6;
}
.faq__item--open .faq__answer { max-height: 500px; }

/* ===== Schema / Visually Hidden ===== */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header__nav { display: none; }
  .header__burger { display: flex; }
  .hero h1 { font-size: 1.75rem; }
  .hero { padding: 3rem 0; }
  .product { grid-template-columns: 1fr; gap: 1.5rem; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

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