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

:root {
  --dark: #1a1a2e;
  --navy: #0f0f1a;
  --text: #1f2937;
  --muted: #6b7280;
  --white: #ffffff;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e5e7eb;
  --success: #10b981;
  --danger: #ef4444;
  --bg-light: #f8fafc;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

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

.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }

/* ===== Top Banner ===== */
.top-banner {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--dark);
}

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

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  position: relative;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 220px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  border-radius: 8px;
  padding: 8px 0;
  margin-top: 12px;
  z-index: 50;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text);
  transition: background 0.2s;
}

.dropdown-content a:hover {
  background: #f3f4f6;
  color: var(--accent);
}

.cart-icon {
  display: flex;
  align-items: center;
  position: relative;
  color: var(--text);
}

.cart-icon:hover {
  color: var(--accent);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--dark);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  background: url('https://images.unsplash.com/photo-1604719312566-8912e9227c6a?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.7));
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 20px;
}

.hero h1 {
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 400;
  opacity: 0.95;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

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

.btn-dark {
  background: var(--dark);
  color: var(--white);
  border-radius: 8px;
  padding: 12px 28px;
}

.btn-dark:hover {
  background: #111827;
}

.btn-accent {
  background: var(--accent);
  color: white;
  border-radius: 8px;
  padding: 12px 24px;
}

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

.btn-outline-dark {
  background: transparent;
  border: 2px solid var(--dark);
  color: var(--dark);
  border-radius: 8px;
  padding: 10px 22px;
}

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

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 6px;
}

.btn-danger {
  background: var(--danger);
  color: white;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
}

.btn-danger:hover {
  background: #dc2626;
}

/* ===== Page Header (inner pages) ===== */
.page-header {
  background: var(--bg-light);
  padding: 48px 0 36px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.page-header p {
  color: var(--muted);
  font-size: 16px;
}

.breadcrumb {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

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

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ===== Categories Section ===== */
.categories {
  padding: 80px 0 60px;
  background: #fafafa;
}

.section-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  text-align: center;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
}

.section-desc {
  text-align: center;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 48px;
  font-size: 16px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 48px;
}

.category-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.category-img {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.category-card h3 {
  font-size: 18px;
  font-weight: 600;
  padding: 20px 20px 8px;
}

.category-card p {
  font-size: 14px;
  color: var(--muted);
  padding: 0 20px;
  margin-bottom: 12px;
}

.see-more {
  display: inline-block;
  padding: 0 20px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.see-more:hover {
  text-decoration: underline;
}

/* ===== Products Grid ===== */
.products-section {
  padding: 60px 0 80px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

.product-img-wrap {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: #f1f5f9;
}

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

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

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

.product-info {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.product-info h3 a:hover {
  color: var(--accent);
}

.product-rating {
  font-size: 13px;
  color: #f59e0b;
  margin-bottom: 8px;
}

.product-rating span {
  color: var(--muted);
  margin-left: 4px;
}

.product-price {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

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

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

.product-actions {
  display: flex;
  gap: 8px;
}

.product-actions .btn {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  border-radius: 6px;
}

/* ===== Product Detail ===== */
.product-detail {
  padding: 60px 0 80px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.product-detail-img {
  background: #f1f5f9;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
}

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

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

.product-detail-info .category-tag {
  display: inline-block;
  background: #e0e7ff;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.product-detail-info .rating {
  margin-bottom: 16px;
  color: #f59e0b;
}

.product-detail-info .price-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.product-detail-info .price-row .current {
  font-size: 28px;
  font-weight: 700;
}

.product-detail-info .price-row .old {
  font-size: 18px;
  color: var(--muted);
  text-decoration: line-through;
}

.product-detail-info .description {
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.7;
}

.qty-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.qty-selector label {
  font-weight: 500;
}

.qty-controls {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.qty-controls button {
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-controls button:hover {
  background: #e5e7eb;
}

.qty-controls input {
  width: 50px;
  height: 36px;
  border: none;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
}

.stock-status {
  font-size: 14px;
  margin-bottom: 20px;
}

.stock-status.in-stock {
  color: var(--success);
}

/* ===== Cart Page ===== */
.cart-section {
  padding: 60px 0 80px;
}

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

.cart-empty h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

.cart-empty p {
  color: var(--muted);
  margin-bottom: 24px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 32px;
}

.cart-table th {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 2px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-table td {
  padding: 20px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.cart-item-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.cart-item-info h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-info a:hover {
  color: var(--accent);
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  width: fit-content;
}

.cart-qty button {
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 16px;
}

.cart-qty input {
  width: 40px;
  height: 32px;
  border: none;
  text-align: center;
  font-size: 14px;
}

.cart-summary {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 28px;
  max-width: 400px;
  margin-left: auto;
}

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

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

.summary-row.total {
  font-size: 18px;
  font-weight: 700;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
}

.cart-summary .btn {
  width: 100%;
  margin-top: 16px;
  justify-content: center;
}

/* ===== Reviews ===== */
.reviews {
  padding: 80px 0;
  background: var(--bg-light);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.review-card {
  background: var(--white);
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.stars {
  color: #f59e0b;
  font-size: 18px;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.review-card p {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 16px;
  font-style: italic;
}

.reviewer {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

/* ===== About / Contact ===== */
.content-section {
  padding: 60px 0 80px;
}

.content-section .content-box {
  max-width: 800px;
  margin: 0 auto;
}

.content-section h2 {
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--dark);
}

.content-section p {
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.7;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 40px;
}

.contact-info-box {
  background: var(--bg-light);
  padding: 32px;
  border-radius: 12px;
}

.contact-info-box h3 {
  font-size: 18px;
  margin-bottom: 20px;
}

.contact-info-box p {
  margin-bottom: 12px;
  font-size: 15px;
}

.contact-info-box a {
  color: var(--accent);
}

.contact-info-box a:hover {
  text-decoration: underline;
}

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

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 16px;
  font-family: inherit;
}

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

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

/* ===== Checkout ===== */
.checkout-section {
  padding: 60px 0 80px;
}

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

.checkout-form h2 {
  font-size: 20px;
  margin-bottom: 20px;
}

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

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

.checkout-form input,
.checkout-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 16px;
  font-family: inherit;
}

.order-summary {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 28px;
  position: sticky;
  top: 90px;
}

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

.order-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
}

.order-item .name {
  flex: 1;
}

.order-total {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--dark);
  color: white;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

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

/* ===== Footer ===== */
.footer {
  background: var(--navy);
  color: var(--white);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand .logo {
  color: var(--white);
  display: block;
  margin-bottom: 8px;
}

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

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
}

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

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .product-detail-grid,
  .checkout-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav.mobile-open {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }
  .hero {
    height: 70vh;
  }
  .categories-grid,
  .products-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-links {
    justify-content: center;
  }
  .cart-table thead {
    display: none;
  }
  .cart-table tr {
    display: block;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
  }
  .cart-table td {
    display: block;
    border: none;
    padding: 8px 0;
  }
  .cart-summary {
    max-width: 100%;
  }
}

/* Extra cart & utility styles */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

.cart-table-wrap {
  overflow-x: auto;
}

.btn-remove {
  background: none;
  border: none;
  font-size: 22px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

.btn-remove:hover {
  color: #ef4444;
}

.btn-clear {
  display: block;
  width: 100%;
  margin-top: 16px;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.btn-clear:hover {
  color: #ef4444;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .cart-summary {
    margin-left: 0;
    max-width: 100%;
  }
}

.nav.mobile-open {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  background: #fff;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  gap: 16px;
  z-index: 99;
}
