/* Mobile devices (up to 767px) */
@media (max-width: 767px) {
  .section {
    padding: 40px 0;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  .navbar-brand {
    font-size: 1.3rem;
  }
  
  .carousel-item {
    height: 300px;
  }
  
  .carousel-caption {
    padding: 20px;
  }
  
  .carousel-caption h2 {
    font-size: 1.8rem;
  }
  
  .carousel-caption p {
    font-size: 1rem;
    max-width: 100%;
  }
  
  .product-card .product-image {
    height: 150px;
  }
  
  .product-actions {
    bottom: 10px;
  }
  
  .product-actions button {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .card-img-top {
    height: 150px;
  }
  
  .footer .col-md-6 {
    margin-bottom: 30px;
  }
  
  #backToTop {
    width: 40px;
    height: 40px;
  }
  
  .toast {
    width: 90vw;
    left: 5%;
    right: 5%;
  }
}

/* Tablets (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .section {
    padding: 60px 0;
  }
  
  .carousel-item {
    height: 400px;
  }
  
  .carousel-caption h2 {
    font-size: 2.5rem;
  }
  
  .product-card .product-image {
    height: 180px;
  }
  
  .footer .col-lg-3 {
    margin-bottom: 30px;
  }
  
  .toast {
    width: 80vw;
  }
}

/* Desktop (992px and above) */
@media (min-width: 992px) {
  .navbar-expand-lg .navbar-nav {
    margin-right: auto;
  }
  
  .product-card:hover .product-actions {
    opacity: 1;
    transform: translateY(0);
  }
  
  .dropdown-menu {
    display: block;
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition);
    pointer-events: none;
  }
  
  .nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }
  
  .cart-icon .badge {
    top: -5px;
    right: -5px;
  }
  
  .toast {
    width: 350px;
  }
}

/* Hover effects for touch devices */
@media (hover: none) {
  .product-card:hover .product-image img,
  .card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
  
  .nav-link:hover::after {
    width: 0;
  }
  
  .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }
}

/* Print styles */
@media print {
  .header,
  .footer,
  .cart-actions,
  .product-actions {
    display: none;
  }
  
  main {
    padding: 20px;
  }
  
  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }
  
  body {
    background-color: white !important;
  }
  
  .product-price,
  .product-old-price {
    color: black !important;
  }
}