/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
*:focus { outline: none; }

:root {
  --primary: #2c5f2d;
  --primary-dark: #1e4520;
  --primary-light: #97bc97;
  --accent: #d4a017;
  --accent-dark: #b8860b;
  --dark: #1a1a2e;
  --gray: #6c757d;
  --light-gray: #f8f9fa;
  --border: #e0e0e0;
  --white: #ffffff;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
  --transition: all 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  background: #fff;
  line-height: 1.6;
}

a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-dark); }

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Announcement Bar ===== */
.announcement-bar {
  background: var(--dark);
  color: #fff;
  text-align: center;
  padding: 8px 20px;
  font-size: 14px;
}

/* ===== Header ===== */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

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

.logo:hover { color: var(--primary-dark); }

.nav-menu {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-menu a {
  color: #333;
  font-weight: 500;
  font-size: 15px;
  position: relative;
}

.nav-menu a:hover { color: var(--primary); }
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}
.nav-menu a:hover::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #333;
  font-size: 15px;
  cursor: pointer;
}

.cart-count {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 16px;
  font-weight: 700;
}

.hero p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 24px;
}

.hero .btn-white {
  background: #fff;
  color: var(--primary);
  padding: 12px 32px;
  border-radius: 30px;
  font-weight: 600;
  display: inline-block;
  transition: var(--transition);
}

.hero .btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ===== Section Title ===== */
.section-title {
  text-align: center;
  margin: 50px 0 30px;
}

.section-title h2 {
  font-size: 28px;
  color: var(--dark);
  margin-bottom: 8px;
}

.section-title p {
  color: var(--gray);
  font-size: 15px;
}

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

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary-light);
}

.product-card .product-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: var(--light-gray);
  overflow: hidden;
}

.product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

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

.product-card .product-info {
  padding: 16px;
}

.product-card .product-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
}

.product-card .product-name a {
  color: inherit;
}

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

.product-card .compare-price {
  font-size: 14px;
  color: var(--gray);
  text-decoration: line-through;
  margin-left: 8px;
}

.product-card .product-short-desc {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .btn-add-cart {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}

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

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

.product-card .badge.sale { background: var(--danger); }
.product-card .badge.new { background: var(--info); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { background: var(--primary-dark); color: #fff; }

.btn-secondary {
  background: var(--gray);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

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

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-block { width: 100%; }

.btn-lg { padding: 14px 32px; font-size: 16px; }

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

.product-detail-images .main-image {
  width: 100%;
  height: 500px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light-gray);
  margin-bottom: 12px;
}

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

.product-detail-images .thumbnails {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.product-detail-images .thumb {
  width: 70px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
}

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

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

.product-detail-info h1 {
  font-size: 26px;
  margin-bottom: 12px;
}

.product-detail-info .price {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
}

.product-detail-info .short-desc {
  font-size: 15px;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.7;
}

.product-detail-info .product-meta {
  margin: 20px 0;
  padding: 16px;
  background: var(--light-gray);
  border-radius: var(--radius);
}

.product-detail-info .product-meta p {
  margin-bottom: 6px;
  font-size: 14px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.quantity-selector button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  border-radius: 6px;
}

.quantity-selector input {
  width: 60px;
  height: 36px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
}

.product-detail-tabs {
  margin: 40px 0;
}

.tab-buttons {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
}

.tab-btn {
  padding: 12px 24px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

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

.tab-content {
  padding: 24px 0;
  display: none;
}

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

.tab-content h3 { margin-bottom: 12px; }
.tab-content p { margin-bottom: 12px; line-height: 1.8; }

/* ===== Cart Page ===== */
.cart-page {
  margin: 40px 0;
}

.cart-page h1 {
  font-size: 28px;
  margin-bottom: 30px;
}

.cart-items {
  width: 100%;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr 120px 100px 40px;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.cart-item .item-name {
  font-size: 15px;
  font-weight: 600;
}

.cart-item .item-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}

.cart-item .item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item .item-quantity button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
}

.cart-item .item-total {
  font-size: 16px;
  font-weight: 700;
}

.cart-item .remove-btn {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 20px;
  cursor: pointer;
}

.cart-summary {
  margin-top: 30px;
  display: flex;
  justify-content: flex-end;
}

.cart-summary .summary-box {
  width: 360px;
  padding: 24px;
  background: var(--light-gray);
  border-radius: var(--radius);
}

.cart-summary .summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 15px;
}

.cart-summary .summary-total {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
  font-size: 20px;
  font-weight: 700;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
}

.cart-empty h2 {
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--gray);
}

/* ===== Checkout Page ===== */
.checkout-page {
  margin: 40px 0;
}

.checkout-page h1 {
  font-size: 28px;
  margin-bottom: 30px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
}

.checkout-form {
  padding: 0;
}

.form-section {
  margin-bottom: 30px;
}

.form-section h3 {
  font-size: 18px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44,95,45,0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkout-summary {
  padding: 24px;
  background: var(--light-gray);
  border-radius: var(--radius);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.checkout-summary h3 {
  font-size: 18px;
  margin-bottom: 20px;
}

.checkout-summary .summary-item {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.checkout-summary .summary-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.checkout-summary .summary-item .info {
  flex: 1;
}

.checkout-summary .summary-item .name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.checkout-summary .summary-item .qty {
  font-size: 12px;
  color: var(--gray);
}

.checkout-summary .summary-item .price {
  font-size: 14px;
  font-weight: 600;
}

.checkout-summary .summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.checkout-summary .summary-total {
  border-top: 2px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
  font-size: 20px;
  font-weight: 700;
}

.payment-methods {
  margin: 16px 0;
}

.payment-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.payment-method:hover {
  border-color: var(--primary);
}

.payment-method.selected {
  border-color: var(--primary);
  background: rgba(44,95,45,0.05);
}

.payment-method input {
  width: auto;
}

.payment-method label {
  cursor: pointer;
  font-weight: 500;
}

/* ===== Order Confirmation ===== */
.order-confirmation {
  text-align: center;
  padding: 60px 20px;
  max-width: 600px;
  margin: 0 auto;
}

.order-confirmation .check-icon {
  font-size: 60px;
  color: var(--success);
  margin-bottom: 20px;
}

.order-confirmation h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

.order-confirmation .order-number {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
}

.order-confirmation p {
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 30px;
}

/* ===== Track Order Page ===== */
.track-order-page {
  margin: 40px 0;
  max-width: 800px;
  margin: 40px auto;
}

.track-order-page h1 {
  text-align: center;
  margin-bottom: 30px;
}

.track-form {
  text-align: center;
  margin-bottom: 40px;
}

.track-form input {
  width: 300px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
}

.track-form button {
  margin-left: 10px;
}

.order-info-card {
  background: var(--light-gray);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.order-info-card h3 {
  margin-bottom: 16px;
}

.order-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.tracking-timeline {
  position: relative;
  padding-left: 30px;
}

.tracking-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.tracking-event {
  position: relative;
  margin-bottom: 20px;
}

.tracking-event::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.tracking-event.active::before {
  background: var(--primary);
}

.tracking-event .event-status {
  font-weight: 600;
  font-size: 14px;
}

.tracking-event .event-time {
  font-size: 12px;
  color: var(--gray);
}

.tracking-event .event-desc {
  font-size: 13px;
  margin-top: 4px;
}

/* ===== Footer ===== */
.footer {
  background: var(--dark);
  color: #ccc;
  padding: 50px 20px 20px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 16px;
}

.footer-col a {
  display: block;
  color: #aaa;
  margin-bottom: 8px;
  font-size: 14px;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  color: #888;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-menu { display: none; }
  .product-detail { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 60px 1fr 80px; }
  .cart-item .item-quantity,
  .cart-item .remove-btn { display: none; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 15px; }
  .form-row { grid-template-columns: 1fr; }
}
