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

/* --------------------------------------------------------------------------
   General / Shared Responsive Styles
   -------------------------------------------------------------------------- */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 100% !important;
    overflow-x: hidden;
}

#mainNavbar .container {
    overflow: visible !important;
}

/* --------------------------------------------------------------------------
   Home Page Responsive Styles
   -------------------------------------------------------------------------- */

/* ---- Navbar Responsive ---- */
@media (max-width: 992px) {
    #navbarMenu {
        background: rgba(6, 26, 58, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 15px;
        margin-top: 15px;
        padding: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        width: calc(100% - 20px);
        margin-left: 10px;
        margin-right: 10px;
    }

    /* Transition for smoother collapse */
    #navbarMenu.collapsing .navbar-nav {
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    #navbarMenu.show .navbar-nav {
        opacity: 1;
    }

    .navbar-nav .nav-link {
        margin-left: 0;
        padding: 12px 20px !important;
        text-align: center;
        font-size: 1.1rem;
    }
    
    #mainNavbar.navbar-scrolled #navbarMenu {
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    }

    /* Cart Badge Alignment on Mobile */
    #cart-nav-link {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    #cart-item-count {
        position: static !important;
        transform: none !important;
        margin-left: 5px;
    }
}

/* ---- Banner Responsive ---- */
@media (max-width: 768px) {
    .banner-img {
        height: 100vh;
    }
}

/* Products Showcase logic moved to bottom of file */

/* ---- Customer Talks Responsive ---- */
@media (max-width: 768px) {
    .customer-talks .quote-left {
        left: 10px;
    }

    .customer-talks .quote-right {
        right: 10px;
        bottom: -30px;
    }

    .customer-talks .quote-text {
        font-size: 14px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* --------------------------------------------------------------------------
   About Page Responsive Styles
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .about-title {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 2.2rem !important;
    }

    .story-content {
        margin-bottom: 40px;
    }
    
    .about-stat-item .stat-number {
        font-size: 2.2rem;
    }

    .about-stat-item .stat-text {
        font-size: 0.85rem;
    }

    /* ---- Get in touch Responsive ---- */
    .git-col {
        padding: 30px 20px;
    }
    
    .git-col.separator {
        border-left: none;
        border-top: 1px solid #eee;
        margin-top: 20px;
        padding-top: 40px;
    }

    .git-icon-v2 {
        font-size: 30px;
    }
}

@media (max-width: 576px) {
    .git-item h5 {
        font-size: 1.05rem;
    }
}

/* --------------------------------------------------------------------------
   Products Page Responsive Styles
   -------------------------------------------------------------------------- */

@media (max-width: 992px) {
    .filter-btn {
        padding: 8px 20px;
        font-size: 0.95rem;
    }
    .category-filter {
        gap: 12px;
        margin-bottom: 40px;
    }
}

/* End of Consolidated Mobile Styles */

/* --------------------------------------------------------------------------
   Cart Page Responsive Styles
   -------------------------------------------------------------------------- */

/* Responsive adjustments */
@media (max-width: 992px) {
    .table-responsive {
        border: none;
    }
}

@media (max-width: 768px) {
    .cart-title {
        font-size: 2rem;
    }
    
    .cart-hero {
        padding: 100px 0 40px;
    }

    /* Convert Table to Cards */
    .table-cart thead {
        display: none; /* Hide header */
    }

    .table-cart, .table-cart tbody, .table-cart tr, .table-cart td {
        display: block;
        width: 100%;
    }

    .table-cart tr {
        margin-bottom: 20px;
        padding: 15px;
        border: 1px solid #eee;
        border-radius: 12px;
        background: #fff;
        position: relative;
        box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    }

    .table-cart td {
        text-align: right;
        padding: 12px 0;
        position: relative;
        border: none;
        border-bottom: 1px solid #f9f9f9;
        min-height: 45px;
    }

    .table-cart td:last-child {
        border-bottom: none;
        padding-top: 15px;
        text-align: center;
    }

    .table-cart td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 50%;
        text-align: left;
        font-weight: 700;
        color: var(--navy-dark);
        font-family: 'Poppins', sans-serif;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }

    /* Product Cell Exception */
    .table-cart td[data-label="Product"] {
        text-align: left;
        padding-bottom: 15px;
        border-bottom: 1px solid #eee;
        margin-bottom: 10px;
    }

    .table-cart td[data-label="Product"]::before {
        display: none;
    }

    .cart-item-img {
        width: 65px;
        height: 65px;
    }

    .cart-item-name {
        font-size: 0.95rem;
    }

    .qty-input-group {
        margin: 0 0 0 auto; /* Align right on mobile */
    }

    /* Remove button - adjust for mobile card */
    .btn-remove {
        background: #dc3545;
        color: #fff;
        width: auto;
        height: auto;
        padding: 8px 20px;
        border-radius: 6px;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0 auto;
    }
    
    .btn-remove::after {
        content: 'Remove Item';
    }
}

@media (max-width: 576px) {
    /* Modal Responsiveness */
    #deleteConfirmModal .modal-dialog {
        margin: 1rem;
    }
    
    #deleteConfirmModal .modal-body {
        padding: 1.5rem !important;
    }
    
    #deleteConfirmModal .d-flex {
        flex-direction: column-reverse;
        gap: 10px !important;
    }
    
    #deleteConfirmModal .btn {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   Footer Responsive Styles
   -------------------------------------------------------------------------- */

/* Footer Responsive logic moved to bottom of file */
/* --------------------------------------------------------------------------
   DISABLE HOVER EFFECTS ON MOBILE (768px and below)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    /* (1) Product Hover (Home & Products Page) */
    .product-card:hover {
        transform: none !important;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05) !important;
    }

    /* Reset spinning image animation */
    .product-card:hover .product-img {
        animation: none !important;
        transform: none !important;
        border-color: #f4f6f9 !important;
    }

    /* Reset button hover in product cards */
    .product-card:hover .btn-add-cart {
        background: transparent !important;
        color: var(--navy-mid) !important;
    }

    /* (2) Add to Cart: Remove Button Hover */
    .btn-remove:hover {
        background: rgba(220, 53, 69, 0.1) !important;
        color: #dc3545 !important;
        transform: none !important;
    }

    /* Reset icon scaling in remove button */
    .btn-remove:hover i {
        transform: none !important;
    }

    /* (3) Generic Hover Overrides for Mobile UX */
    .why-card:hover {
        transform: none !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
    }

    .banner-btn:hover,
    .nav-cta-btn:hover,
    .btn-checkout:hover,
    #deleteConfirmModal .btn-danger:hover,
    #deleteConfirmModal .btn-light:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    /* Filter Buttons Hover Fix */
    .filter-btn:hover:not(.active) {
        background: #f8f9fa !important;
        color: var(--navy-dark) !important;
        border-color: transparent !important;
    }
}

/* ==========================================================================
   FINAL OVERRIDES (Must come last)
   ========================================================================== */

/* Force 1-Column Layout for Product Cards */
@media (max-width: 768px) {
    .row > .col-6 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px !important;
    }
    .product-img {
        width: 160px !important;
        height: 160px !important;
        margin-bottom: 15px !important;
    }
    .product-card {
        padding: 30px 20px !important;
        border-radius: 16px !important;
        margin-bottom: 15px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important;
    }
    .product-name {
        font-size: 1.25rem !important;
        min-height: auto !important;
    }
    .btn-add-cart {
        width: 100% !important;
        padding: 12px !important;
    }
}

/* Force Center & Stack for Footer */
@media (max-width: 768px) {
    .site-footer {
        padding: 40px 0 25px;
    }
    .site-footer .col-6, 
    .site-footer .col-md-12 {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 35px !important;
    }
    .site-footer h5::after {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    .site-footer .list-unstyled {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding-left: 0 !important;
    }
    .site-footer .list-unstyled li {
        text-align: center !important;
    }
    .contact-item {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        text-align: left;
    }
    /* Balanced centering for contact details */
    .contact-item i {
        margin-top: 3px !important;
    }
    .contact-item a, 
    .contact-item span {
        max-width: 280px;
    }
    .social-links {
        justify-content: center !important;
        display: flex !important;
    }
    .footer-bottom {
        text-align: center !important;
        padding-bottom: 20px;
    }
}

/* Products Page Specific consolidation */
@media (max-width: 576px) {
    .section-title {
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
    }
    .category-filter {
        gap: 8px;
        margin-bottom: 30px;
        justify-content: flex-start; /* Better for horizontal scroll */
        overflow-x: auto;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        flex-wrap: nowrap;
        border-bottom: 1px solid #eee;
    }
    .filter-btn {
        padding: 8px 18px;
        font-size: 0.9rem;
        flex: 0 0 auto;
    }
}

