html {
  font-size: 14px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
  font-size: 16px;
  }
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ===== Global Styles ===== */

/* ===== Top Bar ===== */
.top-bar {
  font-size: 0.85rem;
}

/* ===== Navbar ===== */
.navbar-brand {
  font-size: 1.5rem;
}

.navbar .input-group {
  max-width: 600px;
}

/* ===== Category Menu ===== */
.category-menu {
  border-top: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
}

.category-menu .nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s;
}

.category-menu .nav-link:hover {
  color: #0d6efd !important;
}

/* ===== Cards & Products ===== */
.product-card {
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid #e0e0e0;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.product-card img {
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid #e0e0e0;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0d6efd;
}

.product-price-old {
  font-size: 1rem;
  color: #6c757d;
  text-decoration: line-through;
}

.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #dc3545;
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.rating {
  color: #ffc107;
}

/* ===== Banners ===== */
.banner-section {
  margin-bottom: 3rem;
}

.banner-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 10px;
}

.carousel-caption {
  background: rgba(0, 0, 0, 0.6);
  padding: 20px;
  border-radius: 10px;
}

/* ===== Section Headers ===== */
.section-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #0d6efd;
}

.section-header h2 {
  font-weight: 700;
  color: #333;
}

/* ===== Buttons ===== */
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  padding: 10px 25px;
  font-weight: 500;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: scale(1.02);
}

.btn-outline-primary:hover {
  background: #0d6efd;
  color: white;
}

.btn-add-to-cart {
  width: 100%;
  margin-top: 10px;
}

/* ===== Wishlist & Cart Icons ===== */
.wishlist-icon, .cart-icon {
  cursor: pointer;
  transition: color 0.3s;
}

.wishlist-icon:hover {
  color: #dc3545;
}

.cart-icon:hover {
  color: #0d6efd;
}

/* ===== Cart & Checkout ===== */
.cart-item {
  border-bottom: 1px solid #dee2e6;
  padding: 15px 0;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 5px;
}

.quantity-input {
  width: 80px;
  text-align: center;
}

.order-summary {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  position: sticky;
  top: 20px;
}

/* ===== Filters & Sidebar ===== */
.filter-sidebar {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.filter-section:last-child {
  border-bottom: none;
}

/* ===== Pagination ===== */
.pagination {
  margin-top: 30px;
}

.page-link {
  color: #0d6efd;
  border: 1px solid #dee2e6;
  padding: 10px 15px;
}

.page-link:hover {
  background: #0d6efd;
  color: white;
}

.page-item.active .page-link {
  background: #0d6efd;
  border-color: #0d6efd;
}

/* ===== Product Detail ===== */
.product-detail-img {
  max-height: 500px;
  object-fit: contain;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  background: white;
}

.product-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.product-thumbnails img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  transition: border-color 0.3s;
}

.product-thumbnails img:hover,
.product-thumbnails img.active {
  border-color: #0d6efd;
}

/* ===== Reviews ===== */
.review-card {
  background: white;
  padding: 20px;
border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.review-author {
  font-weight: 600;
  margin-bottom: 5px;
}

.review-date {
  font-size: 0.85rem;
color: #6c757d;
}

/* ===== Footer ===== */
footer {
  margin-top: auto;
}

footer a:hover {
  color: white !important;
}

/* ===== Badges ===== */
.badge-new {
  background: #28a745;
}

.badge-sale {
  background: #dc3545;
}

.badge-featured {
  background: #ffc107;
  color: #000;
}

/* ===== Loading Spinner ===== */
.loading-spinner {
  text-align: center;
  padding: 50px 0;
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state i {
  font-size: 5rem;
  color: #dee2e6;
  margin-bottom: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .banner-img {
    height: 250px;
  }
  
  .product-card img {
    height: 180px;
  }
  
  .navbar .input-group {
    width: 100% !important;
    margin: 10px 0;
  }
  
  .category-menu .nav {
    flex-direction: column;
  }
}

/* ===== Utilities ===== */
.cursor-pointer {
  cursor: pointer;
}

.text-primary-custom {
  color: #667eea;
}

.bg-primary-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ===== Checkout Page ===== */
.checkout-progress .step {
  padding: 15px;
  border-radius: 10px;
  transition: all 0.3s;
}

.checkout-progress .step.active {
  background: #e7f3ff;
  color: #0d6efd;
}

.checkout-progress .step i {
  display: block;
}

.address-option .form-check-input:checked ~ .form-check-label .border {
  border-color: #0d6efd !important;
  background: #e7f3ff;
}

.payment-option .form-check-input:checked ~ .form-check-label .border {
  border-color: #0d6efd !important;
  background: #e7f3ff;
}

.address-option .border,
.payment-option .border {
  transition: all 0.3s;
  cursor: pointer;
}

.address-option .border:hover,
.payment-option .border:hover {
  border-color: #0d6efd !important;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

/* Order Confirmation */
.success-checkmark {
  animation: scaleIn 0.5s ease-in-out;
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Print Styles for Order Confirmation */
@media print {
  .btn, nav, footer, .no-print {
    display: none !important;
  }
  
  .container {
    max-width: 100%;
  }
  
  .card {
    border: 1px solid #dee2e6 !important;
    page-break-inside: avoid;
  }
}