/* ======================= UNIVERSAL RESPONSIVE CSS ======================= */
/* For all pages - Cart, Navbar, Product Cards, Footer */
/* Logo remains unchanged - Only fixes cart and layout issues */

/* ======================= CART PANEL FIXES ======================= */

/* Cart Panel - Mobile View */
@media (max-width: 768px) {
    .cart-panel {
        width: 90% !important;
        max-width: 350px !important;
        right: -100% !important;
    }
    
    .cart-panel.open,
    .cart-panel.active {
        right: 0 !important;
    }
    
    .cart-header {
        padding: 12px 15px !important;
    }
    
    .cart-header h3 {
        font-size: 16px !important;
    }
    
    .close-cart {
        font-size: 24px !important;
        width: 30px !important;
        height: 30px !important;
    }
    
    .cart-items {
        max-height: calc(100vh - 160px) !important;
        overflow-y: auto !important;
        padding: 10px !important;
    }
    
    .cart-item {
        padding: 10px !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }
    
    .cart-item-img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .cart-item-title {
        font-size: 12px !important;
    }
    
    .cart-item-price {
        font-size: 11px !important;
    }
    
    .cart-item-subtotal {
        font-size: 12px !important;
    }
    
    .cart-item-controls {
        gap: 5px !important;
    }
    
    .qty-btn {
        width: 24px !important;
        height: 24px !important;
        font-size: 14px !important;
    }
    
    .cart-item-qty {
        font-size: 12px !important;
    }
    
    .remove-item {
        font-size: 16px !important;
    }
    
    .cart-footer {
        padding: 12px 15px !important;
    }
    
    .cart-total-label {
        font-size: 14px !important;
    }
    
    .cart-total-value {
        font-size: 18px !important;
    }
    
    .checkout-btn {
        padding: 10px !important;
        font-size: 13px !important;
    }
}

/* Small Mobile Devices (480px and below) */
@media (max-width: 480px) {
    .cart-panel {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .cart-header {
        padding: 10px 12px !important;
    }
    
    .cart-header h3 {
        font-size: 14px !important;
    }
    
    .cart-items {
        padding: 8px !important;
    }
    
    .cart-item {
        flex-wrap: wrap !important;
        position: relative !important;
        padding: 8px !important;
    }
    
    .cart-item-img {
        width: 45px !important;
        height: 45px !important;
    }
    
    .cart-item-details {
        flex: 1 !important;
    }
    
    .cart-item-title {
        font-size: 11px !important;
        padding-right: 55px !important;
    }
    
    .cart-item-controls {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        flex-direction: row !important;
        gap: 4px !important;
    }
    
    .qty-btn {
        width: 20px !important;
        height: 20px !important;
        font-size: 12px !important;
    }
    
    .remove-item {
        font-size: 14px !important;
        margin-left: 4px !important;
    }
    
    .cart-item-subtotal {
        width: 100% !important;
        text-align: right !important;
        margin-top: 4px !important;
        font-size: 11px !important;
    }
    
    .cart-footer {
        padding: 10px 12px !important;
    }
    
    .cart-total-label {
        font-size: 13px !important;
    }
    
    .cart-total-value {
        font-size: 16px !important;
    }
    
    .checkout-btn {
        padding: 8px !important;
        font-size: 12px !important;
    }
}

/* ======================= FOOTER RESPONSIVE & FONT SIZE INCREASE ======================= */

/* Footer Base Styles - Larger Font */
footer {
    background: rgb(0, 30, 56) !important;
    color: white !important;
    padding: 40px 0 !important;
}

footer h4 {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-bottom: 15px !important;
    letter-spacing: 0.5px !important;
}

footer p,
footer li,
footer a {
    font-size: 14px !important;
    line-height: 1.6 !important;
}

footer .text-\[13px\] {
    font-size: 14px !important;
}

/* Desktop Footer */
@media (min-width: 769px) {
    footer .grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 40px !important;
    }
    
    footer h4 {
        font-size: 18px !important;
    }
    
    footer p,
    footer li,
    footer a {
        font-size: 14px !important;
    }
}

/* Tablet Footer */
@media (max-width: 768px) {
    footer {
        padding: 30px 20px !important;
    }
    
    footer .grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }
    
    footer h4 {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }
    
    footer p,
    footer li,
    footer a {
        font-size: 13px !important;
    }
}

/* Mobile Footer */
@media (max-width: 480px) {
    footer {
        padding: 25px 15px !important;
    }
    
    footer .grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        text-align: center !important;
    }
    
    footer h4 {
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }
    
    footer p,
    footer li,
    footer a {
        font-size: 13px !important;
    }
    
    footer ul {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    footer .flex.gap-4 {
        justify-content: center !important;
    }
    
    .border-t {
        margin-top: 20px !important;
        padding-top: 15px !important;
    }
    
    .border-t .text-\[12px\] {
        font-size: 11px !important;
    }
}

/* Copyright Text */
footer .border-t {
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    margin-top: 30px !important;
    padding-top: 20px !important;
    text-align: center !important;
}

footer .border-t .text-\[12px\] {
    font-size: 13px !important;
}

@media (max-width: 480px) {
    footer .border-t {
        margin-top: 20px !important;
        padding-top: 15px !important;
    }
    
    footer .border-t .text-\[12px\] {
        font-size: 11px !important;
    }
}

/* Social Media Links in Footer */
footer .flex.gap-4 a {
    font-size: 14px !important;
    transition: all 0.3s ease !important;
}

footer .flex.gap-4 a:hover {
    color: white !important;
    opacity: 1 !important;
}

/* ======================= NAVBAR RESPONSIVE (No logo changes) ======================= */
@media (max-width: 768px) {
    .custom-container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .cart-icon-wrapper .text-\[13px\] {
        display: inline-block !important;
        font-size: 11px !important;
    }
    
    .cart-icon-wrapper svg {
        width: 18px !important;
        height: 18px !important;
    }
}

/* ======================= PRODUCT GRID RESPONSIVE ======================= */
@media (max-width: 640px) {
    .product-grid {
        gap: 10px !important;
    }
    
    .product-card .h-64 {
        height: 160px !important;
    }
    
    .product-card .p-4 {
        padding: 8px !important;
    }
    
    .product-card h3 {
        font-size: 12px !important;
    }
    
    .product-card .text-lg {
        font-size: 13px !important;
    }
    
    .add-to-cart-btn {
        padding: 6px !important;
        font-size: 11px !important;
    }
}

/* ======================= FILTER SIDEBAR RESPONSIVE ======================= */
@media (max-width: 1024px) {
    .desktop-filter {
        display: none !important;
    }
    
    .mobile-filter-btn {
        display: block !important;
    }
}

@media (min-width: 1024px) {
    .mobile-filter-btn {
        display: none !important;
    }
    
    .desktop-filter {
        display: block !important;
    }
}

/* ======================= TOAST NOTIFICATION FIX ======================= */
@media (max-width: 640px) {
    .cart-notification {
        bottom: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 90% !important;
        text-align: center !important;
        font-size: 12px !important;
        padding: 10px !important;
        white-space: normal !important;
    }
}

/* ======================= PRODUCT DETAIL PAGE RESPONSIVE ======================= */
@media (max-width: 768px) {
    .flex.flex-col.lg\:flex-row {
        flex-direction: column !important;
    }
    
    .product-price {
        font-size: 28px !important;
    }
    
    .quantity-btn {
        width: 32px !important;
        height: 32px !important;
    }
    
    .delivery-benefits {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    .delivery-item {
        font-size: 10px !important;
    }
    
    .delivery-dot {
        display: none !important;
    }
    
    .custom-design-inner {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .custom-whatsapp-btn {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

/* ======================= HERO SECTION RESPONSIVE ======================= */
@media (max-width: 768px) {
    .hero-container {
        height: 60vh !important;
        min-height: 450px !important;
    }
    
    .hero-main-title {
        font-size: 28px !important;
    }
    
    .hero-description {
        font-size: 12px !important;
        padding: 0 15px !important;
    }
    
    .btn-primary, .btn-secondary {
        padding: 8px 16px !important;
        font-size: 12px !important;
    }
    
    .stats-container {
        gap: 15px !important;
    }
    
    .stat-number {
        font-size: 20px !important;
    }
    
    .stat-label {
        font-size: 9px !important;
    }
}

/* ======================= CATEGORY GRID RESPONSIVE ======================= */
@media (max-width: 640px) {
    .category-grid {
        gap: 8px !important;
    }
    
    .category-name {
        font-size: 10px !important;
    }
}

/* ======================= TESTIMONIALS RESPONSIVE ======================= */
@media (max-width: 768px) {
    .testimonial-card {
        width: 240px !important;
    }
    
    .testimonial-image {
        height: 180px !important;
    }
}

/* ======================= SLIDER RESPONSIVE ======================= */
@media (max-width: 768px) {
    .hero-arrow {
        width: 28px !important;
        height: 28px !important;
    }
    
    .hero-arrow svg {
        width: 12px !important;
        height: 12px !important;
    }
    
    .hero-dot {
        width: 6px !important;
        height: 6px !important;
    }
    
    .hero-dot.active {
        width: 16px !important;
    }
}

/* ======================= SECTION PADDING ======================= */
@media (max-width: 768px) {
    .section-padding {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }
    
    .section-title {
        font-size: 20px !important;
        margin-bottom: 20px !important;
    }
}

/* ======================= CART OVERLAY FIX ======================= */
.cart-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 1000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
}

.cart-overlay.active,
.cart-overlay.show {
    opacity: 1 !important;
    visibility: visible !important;
}


/* ======================= SHOP PAGE FOOTER FIX ======================= */
.shop-page footer,
body:has(.product-grid) footer {
    width: 100% !important;
    margin: 0 !important;
    padding: 40px 0 !important;
    background: rgb(0, 30, 56) !important;
}

.shop-page footer .custom-container,
body:has(.product-grid) footer .custom-container {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

/* Remove any extra margin/padding from shop page body */
.shop-page,
body:has(.product-grid) {
    overflow-x: hidden !important;
}

.shop-page .main-content,
body:has(.product-grid) .main-content {
    overflow-x: hidden !important;
}

/* Shop page footer specific fix */
.shop-footer {
    width: 100% !important;
    margin: 0 !important;
    padding: 40px 0 !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
}

.shop-footer .custom-container {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* ======================= ACTION BUTTONS FIX ======================= */

/* Container for buttons */
.flex.flex-col.sm\:flex-row.gap-3 {
    width: 100%;
    gap: 15px;
}

/* Add to Cart Button */
.add-to-cart-btn {
    flex: 1;
    background: rgb(0, 30, 56);
    color: white;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    border: none;
    min-width: 0;
}

.add-to-cart-btn:hover {
    background: rgb(20, 50, 80);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 30, 56, 0.2);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn i {
    font-size: 14px;
}

/* Buy Now Button */
.buy-now-btn {
    flex: 1;
    background: transparent;
    color: rgb(0, 30, 56);
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    border: 2px solid rgb(0, 30, 56);
    background-color: white;
    min-width: 0;
}

.buy-now-btn:hover {
    background: rgb(0, 30, 56);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 30, 56, 0.2);
}

.buy-now-btn:active {
    transform: translateY(0);
}

.buy-now-btn i {
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .flex.flex-col.sm\:flex-row.gap-3 {
        gap: 10px;
    }
    
    .add-to-cart-btn,
    .buy-now-btn {
        padding: 12px 16px;
        font-size: 12px;
        border-radius: 10px;
    }
    
    .add-to-cart-btn i,
    .buy-now-btn i {
        font-size: 12px;
    }
}

/* Extra Small Devices (below 480px) */
@media (max-width: 480px) {
    .flex.flex-col.sm\:flex-row.gap-3 {
        flex-direction: column;
        gap: 10px;
    }
    
    .add-to-cart-btn,
    .buy-now-btn {
        width: 100%;
        padding: 12px;
        font-size: 13px;
    }
}

/* Tablet Devices */
@media (min-width: 641px) and (max-width: 1024px) {
    .add-to-cart-btn,
    .buy-now-btn {
        padding: 13px 18px;
        font-size: 13px;
    }
}


/* ======================= SOCIAL MEDIA ICONS - MOBILE VISIBILITY FIX ======================= */

/* Show social icons on mobile */
@media (max-width: 640px) {
  .social-logo-img {
    display: inline-flex !important;
  }
  
  .hidden.sm\:flex {
    display: flex !important;
  }
  
  /* Adjust spacing for mobile */
  .gap-3 {
    gap: 0.5rem !important;
  }
}

/* Ensure proper alignment on all devices */
.social-logo-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  cursor: pointer;
  border-radius: 50%;
  background: transparent;
}

.social-logo-img img {
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
  transition: all 0.3s ease;
  display: block;
}

/* Mobile specific sizing */
@media (max-width: 768px) {
  .social-logo-img {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 640px) {
  .social-logo-img {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .social-logo-img {
    width: 28px;
    height: 28px;
  }
}

/* Hover effects - touch friendly for mobile */
.social-logo-img:hover {
  transform: translateY(-2px) scale(1.05);
}

.social-logo-img:active {
  transform: translateY(0) scale(0.98);
}

/* Make sure navbar doesn't break */
@media (max-width: 640px) {
  .flex.justify-between.items-center {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  
  .flex.gap-3.md\:gap-5.items-center {
    gap: 0.75rem !important;
  }
}


/* ======================= HIDE SOCIAL ICONS ON MOBILE ======================= */

/* Hide all social icons on mobile devices */
@media (max-width: 768px) {
  .hidden.sm\:flex.items-center.gap-2.md\:gap-3,
  .hidden.sm\:flex.items-center.gap-3,
  .social-logo-img,
  .social-icon,
  .social-icon-wrapper,
  .whatsapp-logo,
  .instagram-logo,
  .facebook-logo {
    display: none !important;
  }
}

/* Keep them visible on desktop */
@media (min-width: 769px) {
  .hidden.sm\:flex {
    display: flex !important;
  }
}

/* ======================= NO EMPTY SPACE - FULL COVERAGE ======================= */

/* Desktop */
@media (min-width: 1024px) {
  .slider-img-wrapper {
    height: 550px;
  }
  .slider-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .slider-img-wrapper {
    height: 420px;
  }
  .slider-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

/* Mobile - No empty space, perfect fit */
@media (max-width: 767px) {
  .hero-slider-container {
    width: 100%;
  }
  
  .slider-img-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 50%; /* 2:1 aspect ratio */
    position: relative;
    overflow: hidden;
  }
  
  .slider-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30% center;
  }
}

/* Fine-tune object position for different mobile sizes */
@media (max-width: 640px) {
  .slider-img {
    object-position: 35% center;
  }
}

@media (max-width: 480px) {
  .slider-img {
    object-position: 40% center;
  }
}

@media (max-width: 375px) {
  .slider-img {
    object-position: 45% center;
  }
}

/* ======================= SHOP BY CATEGORY - 13 ITEMS MOBILE FIX ======================= */

/* Mobile: Horizontal scroll with 2 rows visible */
@media (max-width: 640px) {
  .shop-category-scroll {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    width: 100%;
  }
  
  .shop-category-scroll .category-grid {
    display: grid !important;
    grid-template-rows: repeat(2, auto) !important;
    grid-auto-flow: column !important;
    grid-template-columns: repeat(7, minmax(140px, 160px)) !important;
    gap: 0.75rem !important;
    width: max-content;
    min-width: 100%;
  }
  
  .shop-category-scroll .category-card {
    width: 100%;
    aspect-ratio: 1 / 1;
  }
  
  /* Clean scrollbar */
  .shop-category-scroll::-webkit-scrollbar {
    height: 4px;
  }
  
  .shop-category-scroll::-webkit-scrollbar-track {
    background: #f5f0f0;
    border-radius: 10px;
  }
  
  .shop-category-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 30, 56, 0.25);
    border-radius: 10px;
  }
}

/* Extra Small Mobile (below 480px) */
@media (max-width: 480px) {
  .shop-category-scroll .category-grid {
    grid-template-columns: repeat(7, minmax(120px, 140px)) !important;
    gap: 0.6rem !important;
  }
  
  .category-name {
    font-size: 9px !important;
  }
}

/* Very Small Mobile (below 375px) */
@media (max-width: 375px) {
  .shop-category-scroll .category-grid {
    grid-template-columns: repeat(7, minmax(100px, 120px)) !important;
    gap: 0.5rem !important;
  }
  
  .category-name {
    font-size: 8px !important;
  }
  
  .category-img-wrapper {
    height: 60% !important;
  }
}

/* Tablet view (641px - 768px) - Keep grid layout */
@media (min-width: 641px) and (max-width: 768px) {
  .category-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1rem !important;
  }
}

/* Small Desktop (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .category-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 1.25rem !important;
  }
}

/* Desktop (1025px and above) */
@media (min-width: 1025px) {
  .category-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 1.5rem !important;
  }
}