/* Custom CSS classes replacing inline styles for responsiveness */

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.about-top-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 50px;
}

.about-images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
    align-content: start;
}

.about-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.mobile-bottom-nav {
    display: none;
}

/* Base Category Bar adjustments */
.category-bar .container>div {
    /* Enables touch scrolling */
    -webkit-overflow-scrolling: touch;
}

.category-bar .container>div::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar for clean Alibaba look */
}

/* Tablet */
@media (max-width: 992px) {

    .footer-grid,
    .about-features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .about-top-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {

    /* Header Adjustments */
    .header-content-row {
        flex-wrap: nowrap !important;
        gap: 10px;
        justify-content: space-between;
        padding: 5px 0;
    }

    .brand-logo {
        gap: 6px;
        min-width: 0;
    }

    .header-logo-img {
        width: 40px;
        flex-shrink: 0;
    }

    .brand-text-wrapper {
        min-width: 0;
    }

    .brand-name {
        font-size: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .brand-tagline {
        display: none !important;
    }

    .header-search-bar {
        order: unset;
        flex: 1;
        max-width: 150px;
        margin-top: 0;
        background: transparent;
        border: none;
    }

    .header-search-bar input {
        display: none;
    }

    .header-search-bar button {
        background: transparent !important;
        color: #333 !important;
        width: auto;
        height: auto;
    }

    .main-nav {
        display: none !important;
    }

    .header-actions {
        order: unset;
        flex-shrink: 0;
    }

    /* Collapse grids */
    .footer-grid,
    .about-features-grid,
    .about-images-grid {
        grid-template-columns: 1fr !important;
    }

    /* Enable mobile nav */
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 9999;
        padding: 10px 0;
    }

    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #444; /* Improved contrast */
        text-decoration: none;
        font-size: 0.75rem;
        transition: color 0.3s;
        font-weight: 500;
    }

    .mobile-bottom-nav a:hover,
    .mobile-bottom-nav a.active {
        color: #ED1C24;
    }

    .mobile-bottom-nav i {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }

    /* Padding for body to avoid bottom nav overlap */
    body {
        padding-bottom: 70px !important;
    }

    /* Make order modal scroll properly on mobile */
    #orderModal>div {
        max-height: 80vh !important;
    }

    /* Why Choose Us Responsive Fixes */
    .why-choose-us-section {
        padding: 40px 0 !important;
        overflow: hidden;
    }
    .why-choose-us-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 20px !important;
    }
    .why-choose-us-content {
        min-width: 100% !important;
        max-width: 100% !important;
        padding-right: 0 !important;
        margin: 0 !important;
    }
    .why-choose-us-content h2 {
        font-size: 2rem !important;
    }
    .why-choose-us-content p {
        font-size: 1rem !important;
        max-width: 100% !important;
    }
    .why-choose-us-content div[style*="display: grid"] {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .why-choose-us-image-wrapper {
        min-width: 100% !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 30px !important;
        position: relative !important;
        padding: 0 !important;
    }
    .why-choose-us-circle {
        width: 250px !important;
        height: 250px !important;
        margin: 0 auto !important;
    }
    .why-choose-us-badge {
        position: relative !important;
        margin: -60px auto 0 auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 260px !important;
        max-width: 90% !important;
        padding: 15px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
        border-radius: 12px !important;
        background: white !important;
        z-index: 5;
    }
    .why-choose-us-badge div[style*="margin-bottom: 25px"] {
        margin-bottom: 10px !important;
    }
    .why-choose-us-badge img[alt="Logo"] {
        height: 16px !important;
    }
    .why-choose-us-badge div[style*="display: grid"] {
        gap: 8px !important;
        text-align: left !important;
    }
    .why-choose-us-badge h4 {
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        margin-bottom: 0 !important;
        color: #111 !important;
    }
    .why-choose-us-badge p {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
        color: #707070; /* Improved contrast */
        margin: 0 !important;
    }
    .why-choose-us-badge div[style*="border-bottom"] {
        padding-bottom: 5px !important;
    }
    .why-choose-us-badge a[href="brochure.pdf"] {
        margin-top: 12px !important;
        padding: 8px !important;
        font-size: 0.75rem !important;
        border-radius: 6px !important;
    }

    /* Discover Banner Responsive Fixes */
    .discover-banner {
        flex-direction: column !important;
        padding: 30px 20px !important;
        gap: 25px !important;
        text-align: center;
    }
    .discover-content-inner {
        flex-direction: column !important;
        gap: 15px !important;
    }
    .discover-title {
        font-size: 2.2rem !important;
    }
    .discover-text h3 {
        font-size: 1.1rem !important;
    }
    .discover-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Extra Small Phones Adjustments */
@media (max-width: 480px) {
    .header-content-row {
        gap: 5px;
        padding: 4px 0;
    }

    .header-logo-img {
        width: 32px;
    }

    .brand-name {
        font-size: 13px;
    }

    .header-search-bar {
        max-width: 40px;
        /* Only show icon */
    }
}

/* Mobile Slide Out Menu */
.mobile-slide-menu {
    position: fixed;
    top: 0;
    left: -340px;
    width: min(86vw, 340px);
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #fff8f8 100%);
    z-index: 10005;
    transition: left 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 18px 0 40px rgba(17, 17, 17, 0.18);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.04);
}

.mobile-slide-menu.open {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    padding: 18px 16px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    gap: 12px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
}

.close-menu-btn {
    background: #f7f7f7;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    font-size: 1.15rem;
    cursor: pointer;
    color: #333;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.04);
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-left: auto;
}

.mobile-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 10px;
}

.mobile-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}

.mobile-brand-text .name {
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #1d1d1f;
}

.mobile-brand-text .tag {
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
}

.mobile-menu-links {
    list-style: none;
    padding: 16px 14px 20px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-menu-links li {
    border: none;
}

.mobile-menu-links li a {
    display: flex;
    align-items: center;
    padding: 16px 18px;
    color: #1f1f1f;
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mobile-menu-links li a:hover,
.mobile-menu-links li a:focus-visible {
    transform: translateX(2px);
    border-color: rgba(212, 28, 35, 0.12);
    box-shadow: 0 12px 22px rgba(212, 28, 35, 0.08);
}

.mobile-menu-links li a i {
    width: 28px;
    color: #D41C23;
    font-size: 1.05rem;
    text-align: center;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(2px);
    z-index: 10004;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.open {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .main-header {
        box-shadow: 0 8px 22px rgba(17, 17, 17, 0.06);
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    }

    .header-content-row {
        gap: 8px;
        padding: 0 4px;
        justify-content: space-between;
    }

    .brand-logo {
        gap: 8px;
        min-width: 0;
        flex: 0 0 auto;
        align-items: center;
    }

    .header-logo-img {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
    }

    .brand-name {
        font-size: 0.78rem;
        letter-spacing: 0.05em;
        line-height: 1;
    }

    .brand-tagline {
        display: none;
    }

    .header-search-bar {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 42px;
        max-width: 42px;
        min-width: 42px;
        flex: 0 0 auto;
        margin: 0 auto;
        padding: 0;
    }

    .header-search-bar input {
        display: none;
    }

    .header-search-bar button {
        width: 38px;
        height: 38px;
        min-width: 38px;
        padding: 0;
        border-radius: 10px;
        background: #ffffff;
        color: #1d1d1f;
        border: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.04);
    }

    .header-search-bar button i {
        font-size: 0.9rem;
    }

    .menu-toggle {
        display: flex !important;
        background: transparent;
        border: none;
        border-radius: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 30px;
        height: 30px;
        cursor: pointer;
        box-shadow: none;
        padding: 0;
        margin-left: auto;
    }

    .menu-toggle span {
        width: 21px;
        height: 2.5px;
        background: #1d1d1f;
        border-radius: 999px;
        display: block;
        margin: 0;
    }
}

@media (max-width: 420px) {
    .brand-name {
        font-size: 0.7rem;
    }

    .mobile-brand-text .name {
        font-size: 0.74rem;
    }

    .mobile-brand-text .tag {
        font-size: 0.5rem;
    }

    .mobile-menu-links li a {
        padding: 14px 15px;
        font-size: 0.95rem;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }

    .mobile-slide-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* Products Page overrides */
@media (max-width: 480px) {
    .product-list-actions {
        grid-template-columns: 1fr !important;
    }

    .products-list .product-list-item {
        margin: 0;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* About Page Specific Responsive Layouts */
.about-overview-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    flex-wrap: wrap;
}

.overview-content {
    flex: 1;
    min-width: 350px;
    position: relative;
    z-index: 2;
}

.image-grid-container {
    flex: 1;
    min-width: 350px;
    position: relative;
    height: 550px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    text-align: center;
}

/* Breakpoints for About Page Elements */
@media (max-width: 768px) {
    .about-overview-grid {
        gap: 30px;
    }

    .overview-content {
        min-width: 100%;
        text-align: center;
    }

    .overview-content h2 {
        font-size: 2.2rem !important;
    }

    .overview-content .brand-dots {
        justify-content: center;
        width: 100%;
    }

    .overview-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .overview-content div[style*="align-items: center; gap: 30px;"] {
        justify-content: center;
    }

    .image-grid-container {
        min-width: 100%;
        height: 350px !important;
        /* Reduce visual height on mobile */
        margin-top: 30px;
        transform: scale(0.85);
        /* shrink abstract art safely */
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* 3D Gallery Resize */
    .gallery-3d {
        height: 350px !important;
    }

    .item-side-left,
    .item-side-right {
        display: none !important;
        /* Hide outermost images on small phones to save width */
    }

    .item-side-mid-left,
    .item-side-mid-right {
        width: 150px !important;
        height: 250px !important;
    }

    .item-center {
        width: 220px !important;
        height: 300px !important;
    }
}

@media (max-width: 480px) {
    .image-grid-container {
        height: 250px !important;
        transform: scale(0.65);
    }

    .faq-container {
        gap: 30px;
    }

    .faq-content {
        min-width: 100%;
    }

    .faq-image {
        min-width: 100%;
    }
}

/* Desktop Specific Alignment with Reference */
@media (min-width: 992px) {
    .about-hero-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .about-team-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 60px 40px;
        max-width: 1000px;
        margin: 0 auto;
    }

    .about-values-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .faq-container {
        flex-wrap: nowrap;
    }

    .faq-content {
        flex: 1.2;
    }

    .faq-image {
        flex: 0.8;
    }
}

/* Global WhatsApp Widget */
.whatsapp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.whatsapp-widget a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    color: white;
    font-size: 30px;
}

.whatsapp-widget a:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .whatsapp-widget {
        bottom: 90px;
        /* Above the mobile-bottom-nav */
    }
}