html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.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;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Styles */
.header-main {
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.top-bar {
  font-size: 0.875rem;
}

.top-bar a:hover {
  color: #2563EB !important;
  text-decoration: none;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-brand:hover {
  color: #1d4ed8 !important;
}

/* Search Bar */
.input-group .form-control:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 0.2rem rgba(37,99,235,0.25);
}

/* User Menu */
.navbar-nav .nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #2563EB !important;
}

.dropdown-menu {
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
  border-radius: 0.5rem;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  transition: background-color 0.3s ease;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  color: #2563EB;
}

/* Cart Badge */
.badge {
  font-size: 0.75rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Category Navigation */
.navbar-dark .navbar-nav .nav-link {
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: #fff;
}

/* Footer Styles */
.footer-main {
  margin-top: auto;
}

.footer-main h5, .footer-main h6 {
  font-weight: 600;
}

.footer-main .social-links a {
  display: inline-block;
  width: 35px;
  height: 35px;
  line-height: 35px;
  text-align: center;
  background-color: rgba(255,255,255,0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.footer-main .social-links a:hover {
  background-color: #2563EB;
  transform: translateY(-2px);
}

.footer-main ul li a {
  transition: color 0.3s ease;
}

.footer-main ul li a:hover {
  color: #fff !important;
  text-decoration: none;
}

.bg-darker {
  background-color: #070c15;
}

/* Newsletter Section */
.bg-secondary {
  background-color: #6c757d !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .top-bar .col-md-6:first-child {
    text-align: center;
    margin-bottom: 0.5rem;
  }
  
  .top-bar .col-md-6:last-child {
    text-align: center;
  }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .flex-grow-1 {
    margin: 1rem 0;
  }
  
  .footer-main .container {
    text-align: center;
  }
  
  .footer-main .social-links {
    justify-content: center;
    margin-top: 1rem;
  }
}

/* General Improvements */
.container-fluid {
  padding-left: 15px;
  padding-right: 15px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading animation for buttons */
.btn:active {
  transform: scale(0.98);
}

/* Card hover effects */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

/* Form improvements */
.form-control {
  border-radius: 0.375rem;
}

.form-control:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 0.2rem rgba(37,99,235,0.25);
}

/* Button improvements */
.btn {
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #2563EB;
  border-color: #2563EB;
}

.btn-primary:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  transform: translateY(-1px);
}

/* Alert improvements */
.alert {
  border-radius: 0.5rem;
  border: none;
}

/* Table improvements */
.table {
  border-radius: 0.5rem;
  overflow: hidden;
}

.table thead th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #2563EB 0%, #1d4ed8 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

/* Product Cards */
.product-card {
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
  border-color: #2563EB;
}

.product-card .card-img-top {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #e9ecef;
}

.product-card .card-title {
  font-weight: 600;
  color: #212529;
}

.product-card .btn {
  font-weight: 500;
}

.product-card .btn-primary {
  background-color: #2563EB;
  border-color: #2563EB;
}

.product-card .btn-primary:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}

/* Feature Items */
.feature-item {
  padding: 1.5rem;
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-3px);
}

.feature-item i {
  color: #2563EB;
  transition: color 0.3s ease;
}

.feature-item:hover i {
  color: #1d4ed8;
}

.feature-item h5 {
  font-weight: 600;
  margin-top: 1rem;
  color: #212529;
}

.feature-item p {
  color: #6c757d;
  margin-bottom: 0;
}

/* Carousel Improvements */
.carousel {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1);
}

.carousel-item img {
  height: 400px;
  object-fit: cover;
}

.carousel-caption {
  background: rgba(0,0,0,0.5);
  border-radius: 0.5rem;
  padding: 2rem;
}

.carousel-caption h3 {
  font-weight: 700;
  margin-bottom: 1rem;
}

.carousel-caption .btn {
  margin-top: 1rem;
}

/* Category Cards */
.card.text-center {
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.card.text-center:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
  border-color: #2563EB;
}

.card.text-center .card-body {
  padding: 2rem 1.5rem;
}

.card.text-center i {
  transition: transform 0.3s ease;
}

.card.text-center:hover i {
  transform: scale(1.1);
}

/* Alert Improvements */
.alert {
  border-radius: 0.5rem;
  border: none;
  padding: 1rem 1.5rem;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
}

/* Responsive Improvements */
@media (max-width: 768px) {
  .hero-section {
    text-align: center;
  }
  
  .hero-section .display-4 {
    font-size: 2rem;
  }
  
  .carousel-item img {
    height: 250px;
  }
  
  .carousel-caption {
    padding: 1rem;
  }
  
  .carousel-caption h3 {
    font-size: 1.25rem;
  }
  
  .feature-item {
    padding: 1rem;
  }
  
  .product-card .card-body {
    padding: 1rem;
  }
}

/* Loading States */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Focus States */
.btn:focus,
.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(37,99,235,0.25);
}

/* Animation for badges */
.badge {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* Product Detail Page Styles */
.product-gallery .main-image {
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  overflow: hidden;
}

.product-gallery .main-image img {
  transition: transform 0.3s ease;
}

.product-gallery .main-image:hover img {
  transform: scale(1.05);
}

.product-gallery .thumbnail-images img {
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.product-gallery .thumbnail-images img:hover {
  border-color: #2563EB;
  transform: scale(1.1);
}

.product-gallery .thumbnail-images img.border-success {
  border-color: #2563EB !important;
}

/* Product Info Styles */
.product-info h1 {
  color: #212529;
  font-weight: 700;
}

.product-info .rating .stars {
  font-size: 1.1rem;
}

.product-info .price-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
}

.product-info .stock-info {
  padding: 0.5rem 0;
}

.product-info .description,
.product-info .product-details {
  border-top: 1px solid #e9ecef;
  padding-top: 1rem;
}

.product-info .description h5,
.product-info .product-details h5 {
  color: #212529;
  font-weight: 600;
  margin-bottom: 1rem;
}

.product-info .product-details ul li {
  padding: 0.25rem 0;
  border-bottom: 1px solid #f8f9fa;
}

.product-info .product-details ul li:last-child {
  border-bottom: none;
}

/* Add to Cart Section */
.add-to-cart-section {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
}

.add-to-cart-section .form-label {
  font-weight: 600;
  color: #495057;
}

.add-to-cart-section .btn {
  font-weight: 500;
}

/* Shipping Info */
.shipping-info {
  border: 1px solid #e9ecef;
}

.shipping-info i {
  font-size: 1.5rem;
}

.shipping-info small {
  font-weight: 500;
  color: #6c757d;
}

/* Product Tabs */
.nav-tabs {
  border-bottom: 2px solid #e9ecef;
}

.nav-tabs .nav-link {
  border: none;
  color: #6c757d;
  font-weight: 500;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
  color: #2563EB;
  background-color: transparent;
  border-color: transparent;
}

.nav-tabs .nav-link.active {
  color: #2563EB;
  background-color: transparent;
  border-bottom: 2px solid #2563EB;
}

.nav-tabs .nav-link i {
  margin-right: 0.5rem;
}

/* Tab Content */
.tab-content {
  border: 1px solid #e9ecef;
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
}

.tab-pane {
  background-color: #fff;
}

.tab-pane h5 {
  color: #212529;
  font-weight: 600;
  margin-bottom: 1rem;
}

.tab-pane p {
  color: #6c757d;
  line-height: 1.6;
}

/* Reviews */
.review-item {
  transition: background-color 0.3s ease;
}

.review-item:hover {
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  padding: 1rem;
  margin: -1rem;
}

.review-item .stars {
  font-size: 0.9rem;
}

.review-item h6 {
  color: #212529;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.review-item p {
  color: #6c757d;
  margin-bottom: 0;
}

/* Breadcrumb */
.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin-bottom: 2rem;
}

.breadcrumb-item a {
  color: #2563EB;
  transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
  color: #1d4ed8;
}

.breadcrumb-item.active {
  color: #6c757d;
}

/* Related Products */
.related-products .card {
  transition: all 0.3s ease;
}

.related-products .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

/* Responsive Design for Product Detail */
@media (max-width: 768px) {
  .product-gallery .thumbnail-images {
    justify-content: center;
  }
  
  .product-info h1 {
    font-size: 1.5rem;
  }
  
  .add-to-cart-section {
    padding: 1rem;
  }
  
  .nav-tabs .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .tab-content {
    font-size: 0.9rem;
  }
}

/* Quantity Selector */
.form-select {
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-select:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 0.2rem rgba(37,99,235,0.25);
}

/* Price Badge */
.badge.bg-danger {
  background-color: #dc3545 !important;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Stock Badge */
.badge.bg-success {
  background-color: #2563EB !important;
}

.badge.bg-danger {
  background-color: #dc3545 !important;
}

/* Table Styles for Specifications */
.table {
  margin-bottom: 0;
}

.table td {
  padding: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.table td:first-child {
  font-weight: 600;
  color: #495057;
  width: 30%;
}

.table td:last-child {
  color: #6c757d;
}

/* Alert Styles */
.alert-warning {
  background-color: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.alert-warning i {
  color: #f39c12;
}

