﻿/* =============================================
   Teaperson - Chinese Tea Online Shop
   Main Stylesheet
   Encoding: UTF-8
   ============================================= */

/* CSS Variables */
:root {
  --primary-color: #2c5530;
  --primary-dark: #1a3520;
  --primary-light: #4a7a4e;
  --accent-color: #c9a227;
  --accent-light: #e6c45a;
  --text-color: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --bg-color: #ffffff;
  --bg-light: #f8f6f3;
  --bg-card: #ffffff;
  --border-color: #e5e5e5;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
  --header-height: 70px;
  --container-width: 1280px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-color);
  background-color: var(--bg-light);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================================
   HEADER - Fixed Top Bar
   ============================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-color);
  box-shadow: var(--shadow);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 30px;
  flex: 1;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo img {
  height: 45px;
  width: auto;
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

/* Search Box */
.search-box {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.search-box input {
  width: 100%;
  height: 44px;
  padding: 0 50px 0 20px;
  border: 2px solid var(--border-color);
  border-radius: 25px;
  font-size: 15px;
  transition: var(--transition);
  background: var(--bg-light);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-color);
}

.search-box button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: var(--primary-color);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.search-box button:hover {
  background: var(--primary-dark);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
  color: white;
  font-weight: 600;
  border-radius: 25px;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.3);
  transition: var(--transition);
}

.btn-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
  color: white;
}

.cart-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border-radius: 50%;
  color: var(--text-color);
  transition: var(--transition);
}

.cart-btn:hover {
  background: var(--primary-color);
  color: white;
}

.cart-btn .count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  background: #e74c3c;
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--bg-light);
  border-radius: 8px;
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-color);
  transition: var(--transition);
}

/* =============================================
   NAVIGATION
   ============================================= */
.nav {
  background: var(--primary-color);
  margin-top: var(--header-height);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 16px 24px;
  color: white;
  font-weight: 500;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--accent-color);
  transform: translateX(-50%);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255,255,255,0.1);
  color: white;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main {
  min-height: calc(100vh - var(--header-height) - 200px);
  padding: 40px 0;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero p {
  font-size: 20px;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto 30px;
}

.hero-btns {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: var(--transition);
}

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

.btn-primary:hover {
  background: var(--accent-light);
  color: white;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
}

.btn-outline:hover {
  background: white;
  color: var(--primary-color);
}

/* Section Title */
.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 12px;
}

.section-title p {
  font-size: 16px;
  color: var(--text-light);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.product-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-light);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  background: var(--accent-color);
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
}

.product-info {
  padding: 20px;
}

.product-category {
  font-size: 12px;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.product-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.price-old {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 8px;
}

.add-cart-btn {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.add-cart-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

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

.category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1.2;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: white;
}

.category-overlay h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-overlay p {
  font-size: 14px;
  opacity: 0.9;
}

/* Knowledge Section */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.knowledge-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.knowledge-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.knowledge-image {
  aspect-ratio: 2/1;
  overflow: hidden;
}

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

.knowledge-content {
  padding: 20px;
}

.knowledge-category {
  font-size: 12px;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.knowledge-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 12px;
  line-height: 1.4;
}

.knowledge-excerpt {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Reviews Section */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.review-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.review-author {
  font-weight: 600;
  color: var(--text-color);
}

.review-date {
  font-size: 13px;
  color: var(--text-muted);
}

.review-rating {
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
}

.review-rating svg {
  color: var(--accent-color);
}

.review-text {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* Product Detail Page */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.product-gallery {
  position: sticky;
  top: calc(var(--header-height) + 40px);
}

.product-main-image {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bg-light);
}

.product-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumbs {
  display: flex;
  gap: 12px;
}

.product-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.product-thumb.active,
.product-thumb:hover {
  border-color: var(--primary-color);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-info h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 16px;
}

.product-detail-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.product-detail-price {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color);
}

.product-specs {
  margin-bottom: 24px;
}

.spec-row {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.spec-label {
  width: 140px;
  font-weight: 600;
  color: var(--text-color);
}

.spec-value {
  flex: 1;
  color: var(--text-light);
}

.product-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.quantity-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-color);
  transition: var(--transition);
}

.quantity-btn:hover {
  background: var(--bg-light);
}

.quantity-input {
  width: 60px;
  height: 44px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  font-size: 16px;
}

.btn-add-cart {
  flex: 1;
  height: 44px;
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-add-cart:hover {
  background: var(--primary-dark);
}

/* Product Tabs */
.product-tabs {
  margin-bottom: 40px;
}

.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 12px 24px;
  font-weight: 600;
  color: var(--text-light);
  position: relative;
  transition: var(--transition);
}

.tab-btn.active {
  color: var(--primary-color);
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: var(--transition);
}

.tab-btn.active::after {
  transform: scaleX(1);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Review Form */
.review-form {
  background: var(--bg-light);
  padding: 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.review-form h3 {
  font-size: 18px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.rating-input {
  display: flex;
  gap: 4px;
}

.rating-input svg {
  cursor: pointer;
  transition: var(--transition);
}

/* =============================================
   SIDEBAR - Category Page
   ============================================= */
.category-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
}

.sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: calc(var(--header-height) + 40px);
}

.sidebar-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}

.filter-group {
  margin-bottom: 24px;
}

.filter-group h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.filter-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.price-range {
  display: flex;
  gap: 12px;
}

.price-range input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--primary-dark);
  color: white;
  padding: 60px 0 0;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.7;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--accent-color);
  color: white;
}

.footer-col h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 14px;
  opacity: 0.8;
  transition: var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 14px;
  opacity: 0.7;
}

/* =============================================
   BACK TO TOP & FLOATING CART
   ============================================= */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

.floating-cart {
  position: fixed;
  bottom: 30px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(201, 162, 39, 0.4);
  z-index: 998;
  transition: var(--transition);
}

.floating-cart:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.5);
}

.floating-cart .count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  background: #e74c3c;
  font-size: 12px;
  font-weight: 600;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info h2 {
  font-size: 32px;
  margin-bottom: 24px;
}

.contact-info p {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 30px;
  line-height: 1.7;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-text h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-text p {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 0;
}

.contact-form {
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.contact-form h3 {
  font-size: 24px;
  margin-bottom: 24px;
}

/* =============================================
   KNOWLEDGE PAGE
   ============================================= */
.knowledge-hero {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 60px 0;
  text-align: center;
  margin-bottom: 40px;
}

.knowledge-hero h1 {
  font-size: 40px;
  margin-bottom: 16px;
}

.knowledge-hero p {
  font-size: 18px;
  opacity: 0.9;
}

.knowledge-categories {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  justify-content: center;
}

.knowledge-cat-btn {
  padding: 10px 24px;
  background: var(--bg-card);
  border-radius: 25px;
  font-weight: 500;
  transition: var(--transition);
}

.knowledge-cat-btn:hover,
.knowledge-cat-btn.active {
  background: var(--primary-color);
  color: white;
}

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.breadcrumb span {
  color: var(--text-color);
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .header-inner {
    flex-wrap: wrap;
  }
  
  .search-box {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
    margin-top: 10px;
  }
  
  .nav-list {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav-link {
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .knowledge-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .category-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
  }
  
  .product-detail {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .product-gallery {
    position: static;
  }
  
  .contact-section {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }
  
  .header-left {
    flex: 1;
  }
  
  .logo-text {
    font-size: 20px;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--primary-color);
    z-index: 999;
  }
  
  .nav.active {
    display: block;
  }
  
  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }
  
  .nav-link {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  .hero {
    padding: 50px 0;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .section-title h2 {
    font-size: 26px;
  }
  
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .product-info {
    padding: 16px;
  }
  
  .product-title {
    font-size: 14px;
  }
  
  .price {
    font-size: 18px;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
  }
  
  .knowledge-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .back-to-top {
    bottom: 90px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .header-right {
    gap: 10px;
  }
  
  .btn-contact {
    padding: 10px 18px;
    font-size: 14px;
  }
  
  .btn-contact span {
    display: none;
  }
  
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .hero-btns {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  
  .product-detail-info h1 {
    font-size: 24px;
  }
  
  .product-detail-price {
    font-size: 28px;
  }
}

/* =============================================
   UTILITIES
   ============================================= */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

.hidden { display: none; }
.visible { display: block; }

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
  .header, .nav, .footer, .back-to-top, .floating-cart {
    display: none;
  }
  
  .main {
    padding: 0;
  }
}
/* ===== Footer Social & Contact Styles ===== */
.footer-social { display:flex; gap:12px; margin-top:12px; flex-wrap:wrap; align-items:center }
.social-link { font-size:14px; text-decoration:none; padding:6px 12px; background:rgba(255,255,255,0.1); border-radius:20px; color:rgba(255,255,255,0.8); transition:all .2s }
.social-link:hover { background:rgba(255,255,255,0.2); color:white }
.contact-links li { font-size:14px; color:rgba(255,255,255,0.75); margin-bottom:8px; list-style:none }
.payment-icons { display:flex; gap:8px; flex-wrap:wrap }
.payment-badge { background:rgba(255,255,255,0.15); padding:4px 10px; border-radius:4px; font-size:12px; color:rgba(255,255,255,0.9); font-weight:500 }

/* ============================
   Language & Currency Selector
   ============================ */
.lang-currency-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.lang-select,
.currency-select {
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  color: #333;
  padding: 5px 8px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.lang-select:hover,
.currency-select:hover {
  border-color: #2c5530;
}

.lang-select:focus,
.currency-select:focus {
  border-color: #2c5530;
  box-shadow: 0 0 0 2px rgba(44,85,48,0.15);
}

.lang-currency-selector .sep {
  color: rgba(255,255,255,0.4);
  font-size: 12px;
}

/* ============================
   Cart Sidebar
   ============================ */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 100vw;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.cart-sidebar.open {
  right: 0;
}

.cart-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cart-sidebar-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cart-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.cart-sidebar-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #222;
  margin: 0;
}

.cart-sidebar-close {
  background: none;
  border: none;
  font-size: 22px;
  color: #888;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}

.cart-sidebar-close:hover {
  background: #f0f0f0;
  color: #333;
}

.cart-sidebar-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.cart-sidebar-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  padding: 40px 20px;
  text-align: center;
}

.cart-sidebar-empty svg {
  width: 64px;
  height: 64px;
  color: #ddd;
  margin-bottom: 16px;
}

.cart-sidebar-item {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.15s;
}

.cart-sidebar-item:hover {
  background: #fafafa;
}

.cart-sidebar-item-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: #f0f0f0;
  flex-shrink: 0;
}

.cart-sidebar-item-info {
  flex: 1;
  min-width: 0;
}

.cart-sidebar-item-info p {
  margin: 0 0 4px 0;
  font-size: 13px;
  color: #333;
  font-weight: 500;
  line-height: 1.3;
}

.cart-sidebar-item-info .cart-item-price {
  font-size: 13px;
  color: #2c5530;
  font-weight: 600;
}

.cart-sidebar-item-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #555;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.qty-btn:hover {
  background: #f0f0f0;
}

.cart-item-qty {
  font-size: 13px;
  color: #555;
  min-width: 20px;
  text-align: center;
}

.remove-item {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 16px;
  padding: 2px;
  margin-left: 4px;
  transition: color 0.15s;
}

.remove-item:hover {
  color: #e53935;
}

.cart-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid #eee;
  flex-shrink: 0;
  background: #fff;
}

.cart-sidebar-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #222;
}

.cart-sidebar-total strong {
  color: #2c5530;
  font-size: 18px;
}

.cart-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-checkout {
  width: 100%;
  padding: 12px;
  background: #2c5530;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
  text-decoration: none;
  display: block;
}

.btn-checkout:hover {
  background: #1e4025;
}

.btn-continue {
  width: 100%;
  padding: 10px;
  background: #f5f5f5;
  color: #555;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}

.btn-continue:hover {
  background: #eee;
}

.cart-count-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e53935;
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-count-badge.zero {
  display: none;
}