/* Basic responsive style */
:root{--accent:#4a3aff;--bg:#f6f6f8}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
}

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

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.site-header .logo {
  font-size: 24px;
  font-weight: 800;
  color: #333;
  margin: 0;
}

.site-header .logo span {
  color: #667eea;
}

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

.header-actions .btn {
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
}

.user-name {
  font-weight: 600;
  color: #667eea;
  font-size: 13px;
}

/* HERO SECTION */
.hero {
  position: relative;
  height: 350px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 30px 0;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.slider {
  display: flex;
  height: 100%;
  width: 100%;
}

.slide {
  min-width: 100%;
  height: 100%;
  display: none;
  position: relative;
  overflow: hidden;
}

.slide.active {
  display: block;
  animation: fadeInSlide 0.8s ease-out;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: scale(1.05);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 10;
  width: 100%;
  padding: 20px;
}

.hero-content h2 {
  font-size: 42px;
  margin-bottom: 12px;
  font-weight: 800;
  text-shadow: 0 3px 6px rgba(0,0,0,0.3);
  animation: slideUpText 0.8s ease-out;
}

.hero-content p {
  font-size: 18px;
  opacity: 0.95;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  animation: slideUpText 0.8s ease-out 0.2s both;
}

@keyframes slideUpText {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slider-nav {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 15px;
}

.slider-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  border: none;
  cursor: pointer;
  font-size: 22px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  color: #667eea;
  font-weight: bold;
}

.slider-btn:hover {
  background: white;
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.slider-btn:active {
  transform: scale(0.95);
}

/* CONTROLS SECTION */
.controls {
  margin: 40px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 15px;
}

.search-box {
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid transparent;
  border-radius: 30px;
  font-size: 16px;
  background: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

.search-box input::placeholder {
  color: #bbb;
}

.search-box input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.2);
  transform: translateY(-2px);
}

.categories {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.cat-btn {
  padding: 12px 28px;
  border: 2px solid #ddd;
  background: white;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cat-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cat-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
  transform: scale(1.05);
}

/* PRODUCTS GRID - 70% IMAGE, 30% DETAILS */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin: 50px 0;
  padding: 0 15px 120px 15px;
}

.product {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  border: 2px solid transparent;
  height: 100%;
}

.product:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.15);
  border-color: #667eea;
}

.product-image {
  position: relative;
  overflow: hidden;
  height: 280px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  flex-shrink: 0;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product:hover .product-image img {
  transform: scale(1.12) rotate(2deg);
}

.stock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  background: #27ae60;
  color: white;
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
  animation: badgePulse 0.6s ease-out;
}

.stock-badge.out-stock {
  background: #e74c3c;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

@keyframes badgePulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.product-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-info h4 {
  font-size: 15px;
  margin-bottom: 6px;
  color: #333;
  line-height: 1.4;
  min-height: 32px;
  font-weight: 700;
}

.category {
  font-size: 11px;
  color: #888;
  margin-bottom: 8px;
  font-weight: 600;
}

.price {
  font-size: 20px;
  color: #e74c3c;
  font-weight: 900;
  margin-bottom: 8px;
}

.description {
  font-size: 12px;
  color: #777;
  margin-bottom: 12px;
  line-height: 1.4;
}

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

.view-btn,
.add-cart-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.view-btn {
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
  color: #333;
  border: 2px solid #ddd;
}

.view-btn:hover {
  background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #667eea;
  color: #667eea;
}

.add-cart-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.add-cart-btn:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a3fa0 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.add-cart-btn:active {
  transform: translateY(0);
}

.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #bbb;
  font-size: 20px;
  font-weight: 600;
}

/* CONTACT SECTION */
.contact {
  margin: 80px 0 40px 0;
  text-align: center;
  padding: 40px 20px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.contact h3 {
  font-size: 28px;
  margin-bottom: 30px;
  color: #333;
  font-weight: 800;
}

.contact-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-btn {
  padding: 14px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.contact-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
}

.contact-btn:active {
  transform: translateY(-1px);
}

/* BOTTOM NAVIGATION */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 3px solid #eee;
  display: flex;
  justify-content: space-around;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  color: #999;
  text-decoration: none;
  font-size: 11px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  gap: 6px;
  font-weight: 600;
}

.nav-item::before {
  content: attr(data-icon);
  font-size: 24px;
  transition: all 0.3s;
}

.nav-item:hover,
.nav-item.active {
  color: #667eea;
  background: rgba(102, 126, 234, 0.08);
  transform: translateY(-2px);
}

.nav-item span {
  text-align: center;
  width: 100%;
}

.badge {
  position: absolute;
  top: -8px;
  right: 5px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 12px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

/* PAGINATION */
.pagination-section {
  margin: 40px auto;
  padding: 30px 20px;
  text-align: center;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 8px 12px;
  border: 2px solid #ddd;
  background: white;
  color: #667eea;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.page-link:hover {
  border-color: #667eea;
  background: #f9f9f9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.page-link.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.page-dots {
  color: #999;
  font-weight: 600;
  padding: 0 5px;
}

@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    gap: 12px;
    padding: 12px 15px;
  }

  .site-header .logo {
    font-size: 20px;
    width: 100%;
    text-align: center;
  }

  .header-actions {
    width: 100%;
    gap: 8px;
    justify-content: center;
  }

  .header-actions .btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  .user-name {
    display: none;
  }

  .hero {
    height: 250px;
    margin: 20px 0;
  }

  .hero-content h2 {
    font-size: 28px;
  }

  .hero-content p {
    font-size: 14px;
  }

  .products {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    padding: 0 15px 120px 15px;
  }

  .product-image {
    height: 240px;
  }

  .product {
    border-radius: 12px;
  }

  .product-info {
    padding: 12px;
  }

  .product-info h4 {
    font-size: 14px;
    min-height: 32px;
  }

  .price {
    font-size: 18px;
  }

  .categories {
    gap: 8px;
  }

  .cat-btn {
    padding: 10px 20px;
    font-size: 13px;
  }

  .contact {
    margin: 60px 0 20px 0;
    padding: 30px 15px;
  }

  .contact h3 {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .contact-btn {
    padding: 12px 24px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 10px 120px 10px;
  }

  .product {
    border-radius: 10px;
  }

  .product-image {
    height: 180px;
  }

  .product-info {
    padding: 10px;
  }

  .product-info h4 {
    font-size: 13px;
    min-height: 28px;
  }

  .price {
    font-size: 16px;
  }

  .product-actions {
    gap: 8px;
  }

  .view-btn,
  .add-cart-btn {
    padding: 8px;
    font-size: 10px;
  }

  .hero-content h2 {
    font-size: 20px;
  }

  .slider-btn {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .pagination {
    gap: 4px;
  }

  .page-link {
    min-width: 35px;
    height: 35px;
    padding: 6px 8px;
    font-size: 11px;
  }
}

@import url('bottom-nav.css');
@import url('product-detail.css');
@import url('payment.css');