
:root {
  --primary: #131921;
  --primary-light: #232f3e;
  --accent: #ff9900;
  --accent-hover: #e88b00;
  --bg: #eaeded;
  --surface: #ffffff;
  --text-primary: #0f1111;
  --text-secondary: #565959;
  --text-muted: #767676;
  --border: #d5d9d9;
  --success: #007600;
  --link: #007185;
  --link-hover: #c7511f;
  --shadow-sm: 0 2px 5px rgba(15, 17, 17, 0.15);
  --shadow-md: 0 4px 12px rgba(15, 17, 17, 0.2);
  --radius: 8px;
  --radius-lg: 12px;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --container: 1400px;
  --header-height: 100px;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

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

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-top {
  padding: 10px 0;
}

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

.logo {
  flex-shrink: 0;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 3px;
}

.logo:hover {
  border-color: #fff;
}

.logo-svg {
  height: 30px;
  width: auto;
}

.search-bar {
  flex: 1;
  display: flex;
  height: 42px;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  min-width: 0;
}

.search-category {
  background: #f3f3f3;
  border: none;
  border-right: 1px solid #cdcdcd;
  padding: 0 8px;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  min-width: 60px;
}

.search-input {
  flex: 1;
  border: none;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
  min-width: 0;
}

.search-btn {
  background: var(--accent);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.action-item {
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}

.action-item:hover {
  border-color: #fff;
}

.action-line1 {
  font-size: 12px;
  color: #ccc;
}

.action-line2 {
  font-size: 14px;
  font-weight: 700;
}

.cart-icon {
  flex-direction: row;
  align-items: flex-end;
  gap: 5px;
  position: relative;
}

.cart-count {
  position: absolute;
  top: 2px;
  left: 18px;
  background: var(--accent);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 3px;
  min-width: 18px;
  text-align: center;
  transition: transform 0.2s;
}

/* Nav */
.header-nav {
  background: var(--primary-light);
  padding: 6px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.menu-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  white-space: nowrap;
}

.menu-toggle:hover {
  border-color: #fff;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 5px;
}

.nav-links a {
  color: #fff;
  font-size: 14px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  white-space: nowrap;
}

.nav-links a:hover {
  border-color: #fff;
}

/* Mobile Menu */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 85%;
  background: #fff;
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-header {
  background: var(--primary-light);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  position: relative;
}

.close-menu {
  position: absolute;
  right: 16px;
  font-size: 28px;
  color: #fff;
  padding: 5px;
}

.mobile-menu-content {
  padding: 20px;
}

.mobile-menu-content h3 {
  font-size: 18px;
  margin: 16px 0 8px;
  color: var(--text-primary);
}

.mobile-menu-content a {
  display: block;
  padding: 10px 0;
  color: var(--text-secondary);
  font-size: 15px;
  border-bottom: 1px solid #eee;
}

.mobile-menu-content hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 10px 0;
}

/* Cart Sidebar */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 90%;
  background: var(--surface);
  z-index: 301;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 20px rgba(0,0,0,0.2);
}

.cart-sidebar.active {
  transform: translateX(0);
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h2 {
  font-family: var(--font-heading);
  font-size: 22px;
}

.close-cart {
  font-size: 28px;
  color: var(--text-secondary);
  padding: 5px;
  transition: color 0.2s;
}

.close-cart:hover {
  color: var(--text-primary);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.empty-cart-msg {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 16px;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.cart-item-img {
  width: 80px;
  height: 80px;
  background: #f7f7f7;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-item-img img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-item-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-price {
  font-weight: 700;
  color: var(--text-primary);
}

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

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: all 0.2s;
}

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

.cart-item-qty {
  font-size: 14px;
  min-width: 20px;
  text-align: center;
}

.remove-btn {
  margin-left: auto;
  color: var(--link);
  font-size: 13px;
  text-decoration: underline;
}

.remove-btn:hover {
  color: var(--link-hover);
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
}

.checkout-btn {
  width: 100%;
  background: var(--accent);
  color: var(--primary);
  padding: 14px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.2s;
}

.checkout-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* Hero */
.hero {
  position: relative;
  height: 450px;
  margin-bottom: -150px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #232f3e 0%, #131921 100%);
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 80px;
}

.hero-card {
  background: var(--surface);
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 500px;
  animation: fadeInUp 0.6s ease;
}

.hero-card h2 {
  font-family: var(--font-heading);
  font-size: 36px;
  margin-bottom: 12px;
  color: var(--text-primary);
  line-height: 1.2;
}

.hero-card p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 16px;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  padding: 12px 28px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
  box-shadow: 0 2px 5px rgba(255, 153, 0, 0.3);
  text-align: center;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 153, 0, 0.4);
}

/* Products */
.products-section {
  padding: 0 0 40px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--surface);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

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

.product-image {
  width: 100%;
  height: 220px;
  background: #f7f7f7;
  border-radius: 6px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-image img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  transition: transform 0.3s;
}

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

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #cc0c39;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
}

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

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 14px;
}

.stars {
  color: #ffa41c;
  letter-spacing: -1px;
}

.rating-count {
  color: var(--link);
}

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

.product-price .currency {
  font-size: 12px;
  vertical-align: super;
}

.product-original-price {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-bottom: 12px;
}

.prime-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.prime-badge svg {
  fill: #00a8e1;
  width: 40px;
}

.add-to-cart-btn {
  margin-top: auto;
  background: #ffd814;
  border: 1px solid #fcd200;
  color: var(--text-primary);
  padding: 10px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
}

.add-to-cart-btn:hover {
  background: #f7ca00;
}

.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  padding: 10px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
  margin-top: 8px;
  text-decoration: none;
}

.whatsapp-btn:hover {
  background: #128C7E;
  transform: translateY(-2px);
}

/* Deals */
.deals-section {
  background: var(--surface);
  padding: 30px 0;
  margin-bottom: 30px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 24px;
  margin-bottom: 20px;
  padding-left: 10px;
}

.deals-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 10px 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.deal-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  position: relative;
  transition: box-shadow 0.2s;
}

.deal-card:hover {
  box-shadow: var(--shadow-md);
}

.deal-timer {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #cc0c39;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 3px;
}

.deal-image {
  width: 100%;
  height: 160px;
  background: #f7f7f7;
  border-radius: 4px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deal-image img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.deal-title {
  font-size: 14px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deal-price {
  font-weight: 700;
  color: #cc0c39;
  font-size: 16px;
}

.deal-progress {
  margin-top: 8px;
  height: 6px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
}

.deal-progress-bar {
  height: 100%;
  background: #cc0c39;
  border-radius: 3px;
}

/* Features */
.features-section {
  padding: 40px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  padding: 25px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 15px;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* CTA */
.cta-section {
  padding: 40px 0;
}

.cta-box {
  background: linear-gradient(135deg, #232f3e 0%, #131921 100%);
  color: #fff;
  padding: 50px 30px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.cta-box h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  margin-bottom: 12px;
}

.cta-box p {
  color: #ccc;
  margin-bottom: 25px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 10px;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 25px;
  border: none;
  font-size: 15px;
  outline: none;
}

.newsletter-form .btn-primary {
  border-radius: 25px;
  padding: 14px 24px;
}

/* Footer */
.footer {
  background: var(--primary-light);
  color: #fff;
  margin-top: 40px;
}

.footer-top {
  background: #37475a;
  padding: 15px 0;
  text-align: center;
}

.back-to-top {
  color: #fff;
  font-size: 14px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 3px;
}

.back-to-top:hover {
  border-color: #fff;
}

.footer-links {
  padding: 40px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

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

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

.footer-col a:hover {
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid #3a4553;
  padding: 30px 0;
}

.footer-logo {
  text-align: center;
  margin-bottom: 20px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  font-size: 12px;
  color: #999;
}

.footer-legal a {
  color: #999;
}

.footer-legal a:hover {
  text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero {
    height: 380px;
    margin-bottom: -120px;
  }
  .hero-card h2 {
    font-size: 32px;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 140px;
  }
  .header-top-inner {
    flex-wrap: wrap;
    gap: 10px;
  }
  .search-bar {
    order: 3;
    width: 100%;
    margin-top: 5px;
  }
  .header-actions {
    margin-left: auto;
  }
  .action-line1, .action-line2 {
    display: none;
  }
  .cart-icon .action-line2 {
    display: block;
    font-size: 12px;
  }
  .nav-links {
    display: none;
  }
  .hero {
    height: 320px;
    margin-bottom: -100px;
  }
  .hero-content {
    padding-top: 60px;
  }
  .hero-card {
    padding: 20px;
  }
  .hero-card h2 {
    font-size: 26px;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .newsletter-form .btn-primary {
    width: 100%;
  }
  .cart-sidebar {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    height: 280px;
    margin-bottom: -80px;
  }
  .hero-card h2 {
    font-size: 22px;
  }
  .section-title {
    font-size: 20px;
    padding-left: 0;
  }
  .deal-card {
    flex: 0 0 200px;
  }
}
