/* ==========================================================================
   Gujarat Gold Centre Responsive Stylesheet (mobile.css)
   ========================================================================== */

/* --- 1. RESPONSIVE VARIABLES & GLOBAL OVERRIDES --- */
@media (max-width: 992px) {
    :root {
        --header-height: 70px;
    }
    body {
        padding-top: calc(var(--header-height) + var(--announcement-height)) !important;
    }
    .container {
        padding: 0 16px !important;
    }
    .section-header {
        margin-bottom: 36px !important;
    }
    .section-title {
        font-size: 2rem !important;
    }
}

@media (max-width: 600px) {
    :root {
        --header-height: 60px;
        --announcement-height: 36px;
    }
    .section-title {
        font-size: 1.65rem !important;
    }
}

/* --- 2. ANNOUNCEMENT BAR & STICKY HEADER --- */
@media (max-width: 992px) {
    .announcement-bar {
        height: var(--announcement-height) !important;
    }
    .main-header {
        height: var(--header-height) !important;
        background-color: var(--bg-white) !important;
        border-bottom: 1px solid var(--border-color) !important;
        box-shadow: var(--shadow-sm) !important;
        top: var(--announcement-height) !important;
        z-index: 2005 !important; /* Stack header and its drawer menu above the backdrop overlay */
    }
    .header-logo {
        order: 2 !important;
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 100% !important;
        max-width: 160px !important;
        display: flex !important;
        justify-content: center !important;
    }
    .header-logo .logo-link {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 48px !important;
    }
    .logo-img {
        max-width: 100% !important;
        height: auto !important;
        max-height: 100% !important;
    }
    .main-header .yellow-logo {
        display: block !important;
    }
    .main-header .white-logo {
        display: none !important;
    }
    .mobile-nav-toggle {
        display: block !important;
        order: 1 !important;
        background: none !important;
        border: none !important;
        color: var(--text-dark) !important;
        font-size: 1.4rem !important;
        cursor: pointer !important;
    }
    .header-icons {
        order: 3 !important;
        gap: 12px !important;
    }
    .header-icons .btn-login {
        padding: 6px 14px !important;
        font-size: 0.72rem !important;
        border-radius: 4px !important;
    }
    .header-search-box {
        display: none !important; /* Hide desktop search box on mobile viewports */
    }
    .search-mobile-btn {
        display: inline-block !important;
    }
}

@media (max-width: 600px) {
    .header-logo {
        max-width: 125px !important;
    }
    .header-logo .logo-link {
        height: 38px !important;
    }
    .header-icons {
        gap: 8px !important;
    }
    .header-icons .icon-btn {
        font-size: 1.1rem !important;
    }
    .header-icons .btn-login {
        padding: 5px 10px !important;
        font-size: 0.7rem !important;
    }
}

/* --- Mobile Search Bar (toggled via header search icon) --- */
.mobile-search-bar {
    display: none;
    position: fixed;
    top: calc(var(--header-height) + var(--announcement-height));
    left: 0;
    right: 0;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 12px 16px;
    z-index: 2004;
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.mobile-search-bar.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}
.mobile-search-form {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    height: 42px;
    padding: 0 6px 0 16px;
}
.mobile-search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    color: var(--text-dark);
}
.mobile-search-input::placeholder {
    color: var(--text-light);
}
.mobile-search-submit,
.mobile-search-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    border-radius: 50%;
    flex-shrink: 0;
}
.mobile-search-submit {
    color: var(--primary);
}
.mobile-search-close {
    color: var(--text-light);
}

/* Default hidden elements on desktop */
.search-mobile-btn,
.mobile-nav-close {
    display: none;
}

/* --- 3. MOBILE DRAWER NAVIGATION & BACKDROP --- */
.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.mobile-nav-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (max-width: 992px) {
    .navigation-menu {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 280px !important;
        height: 100vh !important;
        background-color: var(--bg-white) !important;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15) !important;
        z-index: 2000 !important;
        transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
        padding: 80px 24px 30px !important;
        border-right: 1px solid var(--border-color) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
    }
    .navigation-menu.active {
        left: 0 !important;
    }
    .mobile-nav-close {
        display: flex !important;
        position: absolute !important;
        top: 16px !important;
        right: 16px !important;
        width: 36px !important;
        height: 36px !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.3rem !important;
        color: var(--text-dark) !important;
        background: var(--bg-light) !important;
        border: none !important;
        border-radius: 50% !important;
        cursor: pointer !important;
        padding: 0 !important;
        transition: background-color var(--transition-fast) !important;
    }
    .mobile-nav-close:hover {
        background-color: var(--border-color) !important;
    }
    .nav-list {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
        width: 100% !important;
    }
    .nav-item {
        width: 100% !important;
    }
    .nav-link {
        color: var(--text-dark) !important;
        font-size: 1rem !important;
        width: 100% !important;
        justify-content: space-between !important;
        padding: 8px 0 !important;
        border-bottom: 1px solid var(--bg-light) !important;
    }
    .nav-link::after {
        display: none !important;
    }
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        border: none !important;
        background-color: var(--bg-light) !important;
        padding: 4px 0 !important;
        margin-top: 4px !important;
        width: 100% !important;
        display: none; /* Toggled via JS */
        border-radius: 8px !important;
    }
    .dropdown-menu a {
        padding: 8px 16px !important;
        font-size: 0.85rem !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.02) !important;
    }
    .dropdown:hover .dropdown-menu {
        display: none; /* Override hover show on mobile */
    }
    .header-icons .dropdown {
        position: relative !important;
        display: inline-flex !important;
        align-items: center !important;
    }
    .profile-dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        transform: translateY(10px) !important;
        background-color: var(--bg-white) !important;
        min-width: 160px !important;
        border-radius: var(--radius-md) !important;
        box-shadow: var(--shadow-md) !important;
        border: 1px solid var(--border-color) !important;
        padding: 8px 0 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        display: block !important;
        z-index: 1000 !important;
    }
    .profile-dropdown-menu.show {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }
    .profile-dropdown-menu a {
        padding: 10px 20px !important;
        text-align: left !important;
        font-size: 0.85rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        background: none !important;
        color: var(--text-dark) !important;
        border: none !important;
    }
    .profile-dropdown-menu a:hover {
        background-color: var(--bg-light) !important;
        color: var(--primary) !important;
    }
    .nav-chevron {
        transition: transform 0.3s ease !important;
    }
    .nav-chevron.rotate-icon {
        transform: rotate(180deg) !important;
    }
}

/* --- 4. HERO CAROUSEL --- */
@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
        display: none !important;
    }
    .carousel-indicators {
        bottom: 8px !important;
    }
    .carousel-indicators li {
        width: 6px !important;
        height: 6px !important;
        border-radius: 50% !important;
        margin: 0 4px !important;
    }
}

/* --- 5. PRODUCTS SECTIONS (2-COLUMN GRID) --- */
@media (max-width: 600px) {
    .products-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        scrollbar-width: none !important;
        gap: 12px !important;
        padding-bottom: 8px !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .products-grid::-webkit-scrollbar {
        display: none !important;
    }
    .product-card {
        flex: 0 0 calc((100% - 12px) / 2) !important;
        max-width: calc((100% - 12px) / 2) !important;
        min-width: calc((100% - 12px) / 2) !important;
        scroll-snap-align: start !important;
        border-radius: var(--radius-md) !important;
    }
    .product-image-area {
        aspect-ratio: 1.05 !important;
    }
    .product-details {
        padding: 12px !important;
    }
    .product-name {
        font-size: 0.82rem !important;
        height: 36px !important;
        margin-bottom: 8px !important;
        line-height: 1.35 !important;
    }
    .current-price {
        font-size: 0.95rem !important;
    }
    .purity-badge {
        top: 8px !important;
        left: 8px !important;
        font-size: 0.58rem !important;
        padding: 2px 6px !important;
        border-radius: 8px !important;
    }
    .add-to-cart-btn {
        padding: 8px 10px !important;
        font-size: 0.75rem !important;
        border-radius: 20px !important;
    }
    .quickview-btn {
        display: none !important;
    }
}

@media (max-width: 380px) {
    .products-grid {
        gap: 8px !important;
    }
    .products-grid .product-card {
        flex: 0 0 calc((100% - 8px) / 2) !important;
        max-width: calc((100% - 8px) / 2) !important;
        min-width: calc((100% - 8px) / 2) !important;
    }
    .product-details {
        padding: 8px !important;
    }
    .product-name {
        font-size: 0.78rem !important;
        height: 32px !important;
    }
    .current-price {
        font-size: 0.88rem !important;
    }
    .add-to-cart-btn {
        font-size: 0.7rem !important;
        padding: 6px 8px !important;
    }
}

/* --- 6. TESTIMONIALS SLIDER (Same as web view) --- */

/* --- 7. CORPORATE & INVESTMENT SECTIONS --- */
@media (max-width: 768px) {
    .corporate-grid, .investment-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    .corporate-img, .investment-img {
        max-height: 300px !important;
        width: 100% !important;
        object-fit: cover !important;
        border-radius: 12px !important;
    }
    .corporate-content {
        text-align: left !important;
    }
    .investment-content-area {
        text-align: center !important;
    }
    .corporate-features {
        align-items: flex-start !important;
        margin-bottom: 24px !important;
    }
    .corporate-features li {
        text-align: left !important;
    }
    .corporate-actions {
        justify-content: flex-start !important;
    }
}

@media (max-width: 576px) {
    .corporate-actions {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }
    .corporate-actions .btn {
        width: 100% !important;
    }
    .investment-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin-bottom: 24px !important;
    }
    .investment-stat-item {
        padding: 12px 8px !important;
        border-radius: 8px !important;
    }
    .investment-stat-number {
        font-size: 1.6rem !important;
    }
    .investment-stat-number .stat-static {
        font-size: 1.1rem !important;
    }
    .investment-stat-label {
        font-size: 0.78rem !important;
        margin-top: 4px !important;
    }
}

/* --- 8. OTHER HOME PAGE MOBILE ADJUSTMENTS --- */
@media (max-width: 600px) {
    .faq-summary {
        font-size: 1rem !important;
    }
    .trust-badges-wrapper {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 16px 10px !important;
        justify-items: center !important;
        padding: 0 !important;
    }
    .trust-badge-item {
        width: 155px !important;
        flex: unset !important;
        justify-content: flex-start !important;
        min-width: unset !important;
        gap: 8px !important;
    }
    .trust-badge-text {
        font-size: 0.85rem !important;
    }
    .trust-badge-icon {
        width: 22px !important;
        height: 22px !important;
    }
}

/* --- 9. SERVICES SECTION HORIZONTAL SCROLL ON MOBILE --- */
@media (max-width: 768px) {
    .services-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        scrollbar-width: none !important;
        gap: 16px !important;
        padding: 12px 4px 24px 4px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .services-grid::-webkit-scrollbar {
        display: none !important;
    }
    .service-card {
        flex: 0 0 290px !important;
        max-width: 290px !important;
        min-width: 290px !important;
        scroll-snap-align: start !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
        height: auto !important;
    }
    .service-image-wrapper {
        aspect-ratio: 16 / 11 !important;
    }
    .service-content {
        padding: 20px !important;
    }
    .service-card-title {
        font-size: 1.2rem !important;
        margin-bottom: 8px !important;
    }
    .service-desc-short {
        font-size: 0.85rem !important;
        margin-bottom: 16px !important;
        line-height: 1.5 !important;
    }
}

/* --- 10. FOOTER MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .main-footer {
        padding: 36px 0 0 !important;
        background-size: cover !important;
        background-position: center !important;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 24px 20px !important;
        padding-bottom: 96px !important;
        position: relative !important;
    }
    .footer-col.footer-about {
        grid-column: span 2 !important;
        text-align: center !important;
    }
    .footer-brand {
        justify-content: center !important;
        margin-bottom: 16px !important;
    }
    .footer-logo-badge {
        height: 48px !important;
    }
    .footer-brand-name {
        font-size: 1.15rem !important;
    }
    .footer-desc {
        font-size: 0.88rem !important;
        line-height: 1.7 !important;
        margin-top: 12px !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .footer-col {
        text-align: left !important;
    }
    /* Left-align the Services column (last child) */
    .footer-col:last-child {
        text-align: left !important;
    }
    .footer-col:last-child .footer-links {
        align-items: flex-start !important;
    }
    .footer-col:last-child .footer-title::after {
        margin-left: 0 !important;
        margin-right: auto !important;
    }
    .footer-title {
        font-size: 1.3rem !important;
        margin-bottom: 18px !important;
        position: relative !important;
        padding-bottom: 10px !important;
    }
    .footer-title::after {
        content: '' !important;
        display: block !important;
        width: 40px !important;
        height: 2px !important;
        background-color: rgba(255, 255, 255, 0.4) !important;
        margin: 10px 0 0 !important;
        border-radius: 2px !important;
    }
    .footer-links {
        gap: 12px !important;
        align-items: flex-start !important;
    }
    .footer-links a {
        font-size: 0.92rem !important;
    }
    /* Social icons: absolutely positioned below both columns, centered */
    .footer-social-links {
        position: absolute !important;
        bottom: 24px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        justify-content: center !important;
        gap: 20px !important;
        margin-top: 0 !important;
        padding-top: 20px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    }
    .footer-social-links a {
        font-size: 1.5rem !important;
        width: 44px !important;
        height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.12) !important;
        transition: background 0.3s ease !important;
    }
    .footer-social-links a:hover {
        background: rgba(255, 255, 255, 0.25) !important;
    }

    /* Footer Bottom Bar */
    .footer-bottom {
        padding: 16px 0 !important;
    }
    .footer-bottom-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 12px !important;
    }
    .copyright {
        font-size: 0.78rem !important;
        order: 2 !important;
    }
    .footer-bottom-right {
        justify-content: center !important;
        gap: 16px !important;
        order: 1 !important;
    }
    .footer-credit {
        font-size: 0.78rem !important;
    }
    .payment-methods {
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .main-footer {
        padding: 28px 0 0 !important;
    }
    .footer-grid {
        gap: 26px !important;
        padding-bottom: 96px !important;
    }
    .footer-logo-badge {
        height: 42px !important;
    }
    .footer-brand-name {
        font-size: 1.05rem !important;
    }
    .footer-desc {
        font-size: 0.82rem !important;
        line-height: 1.65 !important;
    }
    .footer-title {
        font-size: 1.15rem !important;
        margin-bottom: 14px !important;
    }
    .footer-links {
        gap: 10px !important;
    }
    .footer-links a {
        font-size: 0.85rem !important;
    }
    .footer-social-links a {
        font-size: 1.3rem !important;
        width: 40px !important;
        height: 40px !important;
    }
    .copyright {
        font-size: 0.72rem !important;
    }
    .footer-credit {
        font-size: 0.72rem !important;
    }
}
