/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Mobile First - Base styles for all devices */
* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

/* Tablets and below (768px) */
@media (max-width: 768px) {
  
  /* Container adjustments */
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Header */
  .header-center {
    padding: 10px 0;
  }
  
  .logo img {
    max-height: 40px;
  }
  
  .search-bar {
    width: 100%;
    margin: 10px 0;
  }
  
  .header-right {
    justify-content: space-around;
  }
  
  .header-right > div {
    margin: 0 5px;
  }
  
  /* Navigation */
  .header-bottom {
    display: none;
  }
  
  .mobile-menu {
    display: block !important;
  }
  
  /* Hero Slider */
  .hero-slider .slick-slide img {
    height: 250px;
    object-fit: cover;
  }
  
  .hero-content h1 {
    font-size: 24px;
  }
  
  .hero-content p {
    font-size: 14px;
  }
  
  /* Product Grid */
  .product-grid,
  .product-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .product-card {
    padding: 10px;
  }
  
  .product-card h3 {
    font-size: 14px;
  }
  
  .product-card .price {
    font-size: 16px;
  }
  
  /* Flash Deals */
  .flash-deal-card {
    margin: 10px 0;
  }
  
  .flash-deal-timer {
    font-size: 12px;
  }
  
  /* Sidebar */
  .sidebar {
    display: none;
  }
  
  .shop-content {
    width: 100%;
  }
  
  /* Cart */
  .cart-table {
    display: block;
    overflow-x: auto;
  }
  
  .cart-table table {
    min-width: 600px;
  }
  
  /* Checkout */
  .checkout-form .col-md-8,
  .checkout-form .col-md-4 {
    width: 100%;
  }
  
  .form-group {
    margin-bottom: 15px;
  }
  
  /* Product Details */
  .product-details-container {
    flex-direction: column;
  }
  
  .product-images,
  .product-info {
    width: 100%;
  }
  
  /* Mobile Product Detail Layout */
  .mobile-product-gallery {
    background: #fff;
    margin-bottom: 0;
  }
  
  .mobile-product-gallery .main-img {
    position: relative;
    background: #f8f9fa;
  }
  
  .mobile-product-gallery .slick-slide img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    background: white;
  }
  
  .mobile-product-info {
    background: #fff;
    padding: 15px;
  }
  
  .mobile-product-info h2 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
  }
  
  .mobile-price-section {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
  }
  
  .mobile-price-current {
    font-size: 24px;
    font-weight: bold;
    color: #ff4444;
    margin-right: 10px;
  }
  
  .mobile-price-old {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-right: 8px;
  }
  
  .mobile-discount {
    font-size: 12px;
    color: #ff4444;
    font-weight: bold;
  }
  
  .mobile-rating {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .mobile-rating .stars {
    display: flex;
    margin-right: 8px;
  }
  
  .mobile-rating .rating-text {
    font-size: 12px;
    color: #666;
  }
  
  .mobile-option-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
  }
  
  .mobile-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .mobile-option-title {
    font-size: 14px;
    font-weight: 500;
  }
  
  .mobile-option-value {
    font-size: 14px;
    color: #666;
  }
  
  .mobile-color-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .mobile-color-item {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 1px solid #ddd;
    overflow: hidden;
    cursor: pointer;
    position: relative;
  }
  
  .mobile-color-item.selected {
    border: 2px solid #007bff;
  }
  
  .mobile-color-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .mobile-add-to-cart-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px;
    border-top: 1px solid #eee;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  }
  
  .mobile-cart-controls {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  
  .mobile-quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-width: 100px;
  }
  
  .mobile-quantity-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    font-size: 16px;
    cursor: pointer;
  }
  
  .mobile-quantity-display {
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
  }
  
  .mobile-add-cart-btn {
    flex: 1;
    background: linear-gradient(122deg, #c26af5, #54f0ff);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
  }
  
  .mobile-add-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
  }
  
  .mobile-bottom-spacing {
    height: 80px;
  }
  
  /* Footer */
  .footer-widget {
    margin-bottom: 30px;
  }
  
  .footer-bottom {
    text-align: center;
  }
  
  /* Buttons */
  .btn {
    padding: 10px 15px;
    font-size: 14px;
  }
  
  /* Typography */
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  h4 { font-size: 18px; }
  h5 { font-size: 16px; }
  h6 { font-size: 14px; }
  
  /* Spacing */
  .section {
    padding: 30px 0;
  }
  
  /* Breadcrumb */
  .breadcrumb {
    font-size: 12px;
    padding: 10px 0;
  }
}

/* Mobile phones (576px and below) */
@media (max-width: 576px) {
  
  /* Single column layout */
  .product-grid,
  .product-list {
    grid-template-columns: 1fr;
  }
  
  /* Header */
  .topbar {
    display: none;
  }
  
  .logo img {
    max-height: 35px;
  }
  
  .header-right .icon-text {
    display: none;
  }
  
  .header-right .icon {
    font-size: 20px;
  }
  
  /* Search */
  .search-bar input {
    font-size: 14px;
    padding: 8px;
  }
  
  /* Hero */
  .hero-slider .slick-slide img {
    height: 200px;
  }
  
  .hero-content h1 {
    font-size: 20px;
  }
  
  .hero-content p {
    font-size: 12px;
  }
  
  /* Banners */
  .banner-grid {
    grid-template-columns: 1fr;
  }
  
  /* Features */
  .feature-block {
    flex-direction: column;
    text-align: center;
    margin-bottom: 20px;
  }
  
  /* Product Card */
  .product-card {
    padding: 8px;
  }
  
  .product-card-actions {
    flex-wrap: wrap;
  }
  
  .product-card-actions button {
    margin: 5px 0;
  }
  
  /* Cart */
  .cart-summary {
    position: static;
    margin-top: 20px;
  }
  
  /* Checkout */
  .payment-method {
    flex-direction: column;
  }
  
  .order-summary {
    position: static;
  }
  
  /* Modal */
  .modal-content {
    width: 95%;
    margin: 10px auto;
  }
  
  /* Tables */
  table {
    font-size: 12px;
  }
  
  table th,
  table td {
    padding: 8px 4px;
  }
  
  /* Forms */
  input,
  select,
  textarea {
    font-size: 14px;
  }
  
  /* Typography */
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 18px; }
  h4 { font-size: 16px; }
  h5 { font-size: 14px; }
  h6 { font-size: 12px; }
  
  body {
    font-size: 14px;
  }
  
  /* Spacing */
  .section {
    padding: 20px 0;
  }
  
  /* Hide on mobile */
  .hide-mobile {
    display: none !important;
  }
  
  /* Mobile Product Detail Enhancements */
  .mobile-product-gallery .slick-slide img {
    height: 280px;
  }
  
  .mobile-product-info {
    padding: 12px;
  }
  
  .mobile-price-current {
    font-size: 22px;
  }
  
  .mobile-option-card {
    padding: 12px;
    margin-bottom: 12px;
  }
  
  .mobile-color-item {
    width: 50px;
    height: 50px;
  }
  
  .mobile-add-to-cart-fixed {
    padding: 12px;
  }
  
  .mobile-add-cart-btn {
    padding: 10px 16px;
    font-size: 15px;
  }
  
  .mobile-quantity-selector {
    min-width: 90px;
  }
  
  .mobile-quantity-btn {
    padding: 6px 10px;
  }
  
  .mobile-quantity-display {
    padding: 6px 10px;
    font-size: 13px;
  }
}

/* Landscape phones */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-slider .slick-slide img {
    height: 300px;
  }
}

/* Large tablets and small desktops */
@media (min-width: 769px) and (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .container {
    max-width: 960px;
  }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  button,
  a,
  .clickable {
    min-height: 44px;
    min-width: 44px;
  }
  
  .product-card:hover {
    transform: none;
  }
}
