/* ============================================
   CartFox - Responsive Professional Styling
   Mobile First Design Approach
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary-color: #ff6b00;
  --primary-dark: #e68a00;
  --secondary-color: #4ECDC4;
  --dark-color: #0f172a;
  --light-color: #F8F9FA;
  --text-dark: #111827;
  --text-light: #475569;
  --border-color: #e2e8f0;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
  --transition: all 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: radial-gradient(circle at top, #fdf7ec 0%, #f7f4ef 45%, #eef1f6 100%);
}

/* ============================================
   NAVIGATION
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  min-height: 90px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav, .nav-menu {
  display: flex;
  list-style: none;
  gap: 15px;
  align-items: center;
}

.nav a, .nav-menu a {
  color: #334155;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  transition: var(--transition);
}

.nav a:hover, .nav-menu a:hover {
  background: rgba(255, 107, 0, 0.12);
  color: var(--primary-color);
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  background: rgba(255, 107, 0, 0.1);
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 0, 0.2);
  transition: var(--transition);
}

.cart-btn:hover {
  background: rgba(255, 107, 0, 0.2);
}

.cart-count {
  background: #ff3b30;
  color: white;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
}

.search input {
  width: 300px;
  padding: 12px 20px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  outline: none;
  font-size: 14px;
  background: white;
  transition: var(--transition);
}

.search input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 10px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--dark-color);
  margin: 4px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* ============================================
   HEADER & HERO
   ============================================ */

.hero {
  margin: 30px 40px;
  padding: 60px 50px;
  border-radius: 32px;
  background: linear-gradient(135deg, #ff6b00 0%, #ffbb3f 52%, #fff2d6 100%);
  color: #111;
  box-shadow: 0 25px 60px rgba(255, 107, 0, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  width: 100%;
}

.hero-copy-block {
  max-width: 660px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #472b05;
  font-weight: 800;
  margin-bottom: 12px;
  font-size: 13px;
}

.hero h1 {
  font-size: 46px;
  line-height: 1.1;
  margin-bottom: 15px;
  font-weight: 800;
}

.hero p, .hero-copy {
  font-size: 17px;
  margin-bottom: 25px;
  color: #3f2d08;
  line-height: 1.7;
}

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

.btn, .hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: var(--transition);
}

.btn:hover, .hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background-color: var(--primary-dark);
}

.hero-btn.secondary {
  background: rgba(255, 255, 255, 0.95);
  color: #111;
}

.hero-statcards {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 16px;
}

.statcard {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.statcard span {
  display: block;
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 6px;
  color: var(--primary-color);
}

.statcard p {
  color: #5b4632;
  font-weight: 700;
  margin: 0;
  font-size: 13px;
}

/* ============================================
   CONTAINERS & LAYOUT
   ============================================ */

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

.section {
  padding: 40px 20px;
}

.categories, .products {
  padding: 40px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.section-header h2, .categories h2, .products h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
}

/* ============================================
   PRODUCTS & CATEGORIES GRID
   ============================================ */

.category-grid {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.category-card {
  background: white;
  padding: 16px 28px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.category-card:hover {
  transform: translateY(-3px);
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.category-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.category-card p {
  display: none; /* Hide product counts inside chips for cleaner UI */
}

.products-grid, .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.product-card {
  background-color: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(255, 107, 0, 0.08);
  position: relative;
  display: flex;
  flex-direction: column;
}

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

.product-image {
  width: 100%;
  height: 220px;
  background-color: #fff9f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 15px;
}

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

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

.product-card-body, .product-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.badge {
  background: rgba(255, 107, 0, 0.12);
  color: var(--primary-color);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  width: max-content;
  margin-bottom: 10px;
}

.discount {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #e53935;
  color: white;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
}

.product-name, .product-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.product-description {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 14px;
  line-height: 1.5;
  flex-grow: 1;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

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

.old-price {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 13px;
  margin-left: 6px;
}

.rating {
  font-size: 13px;
  color: #f59e0b;
  font-weight: 700;
}

.buy-btn, .btn-add-cart {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.buy-btn:hover, .btn-add-cart:hover {
  background-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
}

/* ============================================
   FEATURES & HIGHLIGHTS
   ============================================ */

.features, .highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 24px;
  padding: 40px;
}

.highlight-card {
  background: white;
  padding: 30px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.highlight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.highlight-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 700;
}

.highlight-card p {
  color: var(--text-light);
  font-size: 14px;
  margin: 0;
}

/* ============================================
   CART & CHECKOUT PAGES
   ============================================ */

.cart-page, .checkout-page {
  padding: 40px;
}

.cart-container, .checkout-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 30px;
}

.cart-item {
  display: flex;
  gap: 20px;
  background: white;
  padding: 20px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  align-items: center;
  margin-bottom: 15px;
}

.cart-item img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 14px;
  background: #f8f8f8;
}

.summary-card {
  background: white;
  padding: 30px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 15px;
}

.summary-row.total {
  border-bottom: none;
  font-weight: 800;
  font-size: 18px;
  color: var(--primary-color);
  margin-top: 10px;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: #0f172a;
  color: #e2e8f0;
  padding: 60px 40px 30px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(160px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

.footer-brand h3 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 24px;
}

.footer-brand p {
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 14px;
}

footer h4 {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
}

footer a, footer p {
  color: #cbd5e1;
  text-decoration: none;
  margin-bottom: 8px;
  display: block;
  font-size: 14px;
  transition: color 0.2s;
}

footer a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(226, 232, 240, 0.1);
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  color: #94a3b8;
  font-size: 13px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ============================================ */

@media(max-width: 1024px) {
  .hero {
    margin: 20px;
    padding: 40px 30px;
    flex-direction: column;
    gap: 30px;
  }
  .cart-page, .checkout-grid, .footer-grid, .features, .highlights {
    grid-template-columns: 1fr;
  }
  .header {
    padding: 0 20px;
  }
}

@media(max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: stretch;
    padding: 15px 20px;
    gap: 15px;
  }
  .nav, .nav-menu {
    display: none;
  }
  .search input {
    width: 100%;
  }
  .hero-statcards {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .hero h1 {
    font-size: 32px;
  }
  .cart-page, .checkout-page, .categories, .products, .features {
    padding: 20px;
  }
}