/* =====================================================
   TechStore — Mobile & Tablet Optimization
   Loaded AFTER style.css / dark.css / responsive.css.
   Scope: user-facing (storefront) pages. Admin panel
   content is intentionally left untouched.
===================================================== */

/* -----------------------------------------------------
   1) BASE / TOUCH / TYPO
----------------------------------------------------- */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

a,
button,
input[type="submit"],
select {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* Prevent iOS auto-zoom when focusing inputs (needs >=16px) */
@media (max-width: 992px) {
    input,
    textarea,
    select,
    .form-control {
        font-size: 16px !important;
    }
}

/* -----------------------------------------------------
   2) ACCOUNT LINKS INSIDE MOBILE NAV
   (rendered only for authenticated non-staff users)
----------------------------------------------------- */
#siteNav .nav-user-links {
    display: none;
}

/* theme toggle lives inside the mobile menu only */
@media (min-width: 993px) {
    #siteNav .nav-theme-li {
        display: none;
    }
}

@media (max-width: 992px) {
    #siteNav .nav-user-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin-top: 8px;
        padding-top: 10px;
        border-top: 1px solid var(--border);
    }

    #siteNav .nav-user-links a {
        display: flex;
        align-items: center;
        gap: 10px;
    }
}
/* -----------------------------------------------------
   2b) ACCOUNT LINKS — DESKTOP HEADER
   Dashboard / Profile / Logout (red exit) shown inline
   next to the main nav on large screens. Mobile keeps
   them inside the side drawer (section 2 above).
----------------------------------------------------- */
@media (min-width: 993px) {
    .header nav {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    #siteNav .nav-user-links {
        display: flex;
        align-items: center;
        gap: 4px;
        margin: 0;
        padding: 0;
        padding-inline-start: 12px;
        border-top: none;
        border-inline-start: 1px solid var(--border);
    }

    #siteNav .nav-user-links a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
    }

    #siteNav .nav-user-links .exit-nav-btn:hover {
        background: rgba(248, 113, 113, .2);
        color: #fff;
    }
}

@media (max-width: 992px) {
    #siteNav .nav-user-links .exit-nav-btn:hover {
        background: rgba(248, 113, 113, .2);
        color: #fff;
    }
}
/* -----------------------------------------------------
   3) HEADER — compact two-row grid (<=992px)
   Row 1: toggle | logo | actions
   Row 2: full-width search
   Menu: right-side drawer (see section 3b)
----------------------------------------------------- */
@media (max-width: 992px) {
    .header .container {
        display: grid;
        grid-template-areas:
            "toggle logo actions"
            "search search search";
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        gap: 10px 12px;
        padding: 12px 0;
    }

    .header .nav-toggle {
        grid-area: toggle;
    }

    .header .logo {
        grid-area: logo;
        justify-self: start;
        font-size: 22px;
        letter-spacing: -.3px;
    }

    .header .logo .logo-img {
        max-height: 36px;
    }

    .header .header-top-row .header-search {
        grid-area: search;
        justify-self: start;
        width: 38px;
        height: 38px;
        order: 0;
    }

    .header .header-search .search-toggle {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .header .header-search .search-form input {
        padding: 8px 14px;
        font-size: 15px;
    }

    .header .actions {
        grid-area: actions;
        justify-self: end;
        gap: 8px;
    }

    /* nav -> full-height side drawer sliding in from the right (RTL) */
    .header nav {
        display: none;
    }

    #siteNav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        height: 100dvh;
        width: min(320px, 88vw);
        margin: 0;
        padding: 0;
        background: var(--surface);
        border-inline-start: 1px solid var(--border);
        box-shadow: -18px 0 44px rgba(0, 0, 0, .5);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 10001;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .32s cubic-bezier(.32, .72, .35, 1), visibility .32s;
    }

    #siteNav.open {
        transform: translateX(0);
        visibility: visible;
    }

    #siteNav .mobile-nav-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 18px 12px;
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 3;
        background: var(--surface);
    }

    #siteNav ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 10px 12px 24px;
        border-top: none;
        margin: 0;
    }

    #siteNav a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 13px 16px;
        border-radius: 12px;
        font-size: 15px;
    }

    #siteNav a::after {
        display: none;
    }

    /* theme toggle moves into the mobile menu */
    .actions .theme-toggle {
        display: none;
    }

    .nav-theme-li {
        margin-top: 6px;
        padding-top: 8px;
        border-top: 1px solid var(--border);
    }

    .nav-theme-btn {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 13px 16px;
        border-radius: 12px;
        background: transparent;
        border: none;
        color: var(--text-muted);
        font-size: 15px;
        font-weight: 500;
        cursor: pointer;
        transition: var(--transition);
    }

    .nav-theme-btn:hover,
    .nav-theme-btn:focus-visible {
        color: var(--accent);
        background: var(--surface-hover);
    }

    .nav-theme-btn i {
        font-size: 15px;
        color: var(--accent);
    }

    body.dark .nav-theme-btn .fa-sun,
    body:not(.dark) .nav-theme-btn .fa-moon {
        display: none;
    }

    /* action buttons -> icon-only squares (logged-in users) */
    .actions .cart-action,
    .actions .admin-nav-btn,
    .actions .exit-nav-btn {
        width: 42px;
        height: 42px;
        padding: 0;
        justify-content: center;
        border-radius: 12px;
        font-size: 15px;
    }

    .actions .admin-nav-btn .btn-label {
        display: none;
    }
}

/* -----------------------------------------------------
   3b) MOBILE NAV SIDE DRAWER — shared pieces
   (head / close button / overlay / scroll lock)
   The drawer itself is only active <=992px (see above).
----------------------------------------------------- */
.mobile-nav-head {
    display: none;
}

.mobile-nav-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
}

.mobile-nav-title i {
    color: var(--accent);
}

.mobile-nav-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: var(--surface-hover);
    color: var(--text-muted);
    font-size: 15px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.mobile-nav-close:hover,
.mobile-nav-close:focus-visible {
    background: var(--danger);
    color: #fff;
    transform: rotate(90deg);
}

.mobile-nav-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}

.mobile-nav-overlay.open {
    opacity: 1;
    visibility: visible;
}

body.nav-open {
    overflow: hidden;
}

/* Guest login/register keep their labels — compact pills on mobile */
@media (max-width: 992px) {
    .actions .login-nav-btn,
    .actions .register-btn {
        padding: 9px 14px;
        font-size: 13px;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .header .nav-toggle {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .header .logo {
        font-size: 20px;
    }

    .header .actions {
        gap: 6px;
    }

    .actions .cart-action,
    .actions .admin-nav-btn,
    .actions .exit-nav-btn,
    .actions .login-nav-btn,
    .actions .register-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 11px;
        font-size: 14px;
    }

    .actions .login-nav-btn .btn-label,
    .actions .register-btn .btn-label {
        display: none;
    }
}

/* -----------------------------------------------------
   4) MOBILE BOTTOM ACTION BAR  (<=992px)
----------------------------------------------------- */
@media (min-width: 993px) {
    .mobile-bottom-bar {
        display: none;
    }
}

.mobile-bottom-bar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 9990;
    display: none;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(10, 7, 19, .92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
}

.mobile-bottom-bar .mb-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 46px;
    padding: 6px 4px;
    border-radius: 14px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    background: transparent;
    border: none;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.mobile-bottom-bar .mb-item i {
    font-size: 18px;
}

.mobile-bottom-bar .mb-item:active {
    transform: scale(.92);
}

.mobile-bottom-bar .mb-item:hover,
.mobile-bottom-bar .mb-item:focus-visible {
    color: var(--accent);
    background: var(--surface-hover);
}

.mb-cart-badge {
    position: absolute;
    top: 2px;
    inset-inline-start: calc(50% + 6px);
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--grad);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: grid;
    place-items: center;
    box-shadow: 0 0 10px var(--glow);
}

@media (max-width: 992px) {
    .mobile-bottom-bar {
        display: grid;
    }

    /* keep content clear of the fixed bar */
    body {
        padding-bottom: calc(58px + env(safe-area-inset-bottom));
    }

    #topButton {
        bottom: calc(70px + env(safe-area-inset-bottom));
        left: 16px;
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    #toast-container {
        top: auto;
        bottom: calc(72px + env(safe-area-inset-bottom));
        left: 12px;
        right: 12px;
        align-items: stretch;
    }

    .toast {
        min-width: 0;
        width: 100%;
        font-size: 13.5px;
        padding: 13px 16px;
    }
}

/* -----------------------------------------------------
   5) GLOBAL SPACING & TYPE SCALE
----------------------------------------------------- */
@media (max-width: 768px) {
    section {
        padding: 48px 0;
    }

    .container {
        width: 92%;
    }

    .page-title {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .page-subtitle {
        font-size: 14px;
        margin-bottom: 22px;
    }

    .section-head-row {
        margin-bottom: 24px;
    }

    .section-head-row h2,
    .section-title {
        font-size: 22px;
    }

    .section-link {
        padding: 8px 16px;
        font-size: 13.5px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .form-group label {
        font-size: 13.5px;
    }

    .form-control {
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    section {
        padding: 40px 0;
    }

    .section-head-row h2,
    .section-title {
        font-size: 20px;
    }
}

/* -----------------------------------------------------
   6) HOME — HERO
----------------------------------------------------- */
@media (max-width: 992px) {
    .hero {
        padding: 70px 0 56px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 56px 0 40px;
    }

    .hero-badge {
        padding: 7px 16px;
        font-size: 12.5px;
        margin-bottom: 20px;
    }

    .hero h1 {
        font-size: clamp(30px, 8.5vw, 44px);
        line-height: 1.3;
        margin-bottom: 16px;
    }

    .hero p {
        font-size: 15px;
        margin-bottom: 28px;
        line-height: 1.9;
    }

    .hero-stats-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 22px 16px;
        max-width: 380px;
        margin: 44px auto 0;
    }

    .hero-stat strong {
        font-size: 26px;
    }
}

@media (max-width: 520px) {
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
    }

    .hero-buttons .primary-btn {
        width: 100%;
        justify-content: center;
    }
}

/* -----------------------------------------------------
   7) HOME — FEATURES / CATEGORIES / OFFER
----------------------------------------------------- */
@media (max-width: 768px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding-top: 8px;
    }

    .feature-card {
        padding: 22px 14px;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        border-radius: 14px;
        font-size: 20px;
        margin-bottom: 12px;
    }

    .feature-card h3 {
        font-size: 14.5px;
    }

    .feature-card p {
        font-size: 12.5px;
    }
}

@media (max-width: 992px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .category-card {
        min-height: 150px;
        padding: 22px 14px;
        gap: 10px;
    }

    .category-icon {
        width: 54px;
        height: 54px;
        border-radius: 16px;
        font-size: 22px;
    }

    .category-card h3 {
        font-size: 16px;
    }

    .category-card p {
        font-size: 12px;
    }

    .category-card .category-cta {
        font-size: 12px;
        margin-top: 0;
    }

    .offer-banner {
        padding: 40px 20px;
    }

    .offer-banner h2 {
        font-size: 24px;
    }

    .offer-banner p {
        font-size: 14px;
    }
}

@media (max-width: 520px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* -----------------------------------------------------
   8) PRODUCT GRIDS & CARDS
----------------------------------------------------- */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .products-scroll-wrap {
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .products-scroll-wrap::-webkit-scrollbar {
        display: none;
    }

    .products-scroll {
        gap: 12px;
        scroll-snap-type: x mandatory;
    }

    .products-scroll .product-card {
        width: 200px;
        scroll-snap-align: start;
    }
}

@media (max-width: 480px) {
    .products-grid {
        gap: 10px;
    }

    .products-scroll .product-card {
        width: 182px;
    }
}

/* Compact card content on small screens */
@media (max-width: 520px) {
    .product-card-body {
        padding: 12px;
        gap: 6px;
    }

    .product-card-meta {
        font-size: 10.5px;
    }

    .product-card-body h3 {
        font-size: 13px;
        line-height: 1.6;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 2.8em;
    }

    .product-card-body p {
        display: none;
    }

    .product-card-body .price {
        font-size: 14px;
        font-weight: 800;
    }

    .product-card-cta {
        display: none;
    }

    .product-card .wishlist-btn {
        top: 8px;
        left: 8px;
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .badge.bestseller-rank,
    .product-card-media .badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    .pstock-badge {
        font-size: 10.5px;
        padding: 3px 8px;
    }
}

/* -----------------------------------------------------
   9) PRODUCTS / LISTING PAGE
----------------------------------------------------- */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 20px;
    }

    .search-box .form-control {
        min-height: 48px;
    }

    .search-box .btn {
        width: 100%;
        justify-content: center;
    }

    .category-filter-bar {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
        padding-bottom: 8px;
        margin-bottom: 20px;
        gap: 8px;
    }

    .category-filter-bar::-webkit-scrollbar {
        display: none;
    }

    .filter-chip {
        flex-shrink: 0;
        white-space: nowrap;
        scroll-snap-align: start;
        padding: 9px 16px;
        font-size: 13px;
    }

    .pagination {
        gap: 6px;
    }

    .page-btn {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 13.5px;
    }
}

/* -----------------------------------------------------
   10) PRODUCT DETAIL
----------------------------------------------------- */
@media (max-width: 768px) {
    .product-detail {
        padding: 28px 0 32px;
    }

    .product-gallery {
        border-radius: var(--radius-sm);
    }

    .product-thumbs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
        gap: 8px;
        padding: 12px;
    }

    .product-thumbs::-webkit-scrollbar {
        display: none;
    }

    .thumb-btn {
        flex-shrink: 0;
        width: 60px;
        height: 54px;
        scroll-snap-align: start;
    }

    .gallery-hint {
        padding: 0 12px 12px;
        font-size: 11.5px;
    }

    .product-info h1 {
        font-size: 22px;
        line-height: 1.6;
    }

    .product-price {
        font-size: 26px;
        padding: 8px 18px;
    }

    .product-meta span {
        font-size: 13px;
        padding: 8px 14px;
    }

    .color-swatch {
        min-height: 44px;
        padding: 8px 12px;
    }

    .buy-box {
        flex-wrap: wrap;
        gap: 12px;
    }

    .add-to-cart-form {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .add-to-cart-form .qty-selector {
        width: 100%;
        justify-content: center;
    }

    .add-to-cart-form .buy-btn {
        width: 100%;
        min-height: 52px;
        padding: 14px 22px;
    }

    .favorite-btn.detail {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .stock-status-banner {
        padding: 14px;
    }

    .product-description {
        padding: 16px;
        font-size: 14px;
    }

    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .reviews-sort {
        width: 100%;
    }

    .reviews-sort select {
        width: 100%;
    }

    .review-card {
        padding: 16px;
    }

    .review-card-head {
        flex-wrap: wrap;
        gap: 10px;
    }

    .review-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .helpful-btn {
        padding: 9px 14px;
    }

    .review-own-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .review-form-panel {
        padding: 18px;
    }
}

/* -----------------------------------------------------
   11) CART
----------------------------------------------------- */
@media (max-width: 768px) {
    .cart-page {
        padding: 28px 0;
    }

    .cart-item-card {
        display: grid;
        grid-template-columns: 84px 1fr;
        grid-template-rows: auto auto;
        gap: 12px;
        padding: 14px;
        align-items: start;
    }

    .cart-item-card > img {
        width: 84px;
        height: 78px;
        grid-row: 1;
    }

    .cart-item-body {
        min-width: 0;
    }

    .cart-item-body h3 {
        font-size: 14.5px;
        line-height: 1.6;
    }

    .cart-qty-form {
        flex-wrap: wrap;
        gap: 8px;
    }

    .cart-stepper .qty-btn {
        width: 38px;
        height: 38px;
    }

    .cart-qty-input {
        width: 60px !important;
    }

    .cart-item-remove {
        grid-column: 1 / -1;
        width: 100%;
        padding-top: 10px;
        border-top: 1px dashed var(--border);
    }

    .cart-item-remove .btn {
        width: 100%;
        justify-content: center;
    }

    .cart-summary-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 16px 18px;
        font-size: 16px;
    }

    .cart-summary-bar strong {
        font-size: 19px;
    }

    .address-confirm-box {
        padding: 18px;
    }

    .address-confirm-box.incomplete {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .cart-actions .btn,
    .cart-actions .buy-product-form {
        width: 100%;
    }

    .cart-actions .btn {
        justify-content: center;
    }

    .cart-buy-hint {
        font-size: 12.5px;
        line-height: 1.8;
    }
}

/* -----------------------------------------------------
   12) AUTH
----------------------------------------------------- */
@media (max-width: 768px) {
    .auth-page--split {
        padding-top: 28px;
    }

    .auth-side {
        padding: 28px 20px;
    }

    .auth-side-inner h2 {
        font-size: 23px;
    }

    .auth-main {
        padding: 28px 18px;
    }

    .auth-card {
        padding: 28px 20px;
    }

    .auth-card h1 {
        font-size: 22px;
    }

    .auth-hint {
        font-size: 13.5px;
    }

    .auth-form .form-control {
        min-height: 48px;
    }

    .auth-switch {
        font-size: 13.5px;
    }
}

/* -----------------------------------------------------
   13) PROFILE / ORDERS / WISHLIST / NOTIFICATIONS
----------------------------------------------------- */
@media (max-width: 768px) {
    .profile-header {
        padding: 20px;
    }

    .profile-header-info {
        gap: 14px;
    }

    .profile-avatar,
    .profile-avatar-placeholder {
        width: 68px;
        height: 68px;
        font-size: 24px;
    }

    .profile-section-card {
        padding: 18px;
    }

    .profile-section {
        padding: 18px;
    }

    .profile-cart-item {
        flex-wrap: wrap;
    }

    .profile-cart-item img {
        width: 64px;
        height: 56px;
    }

    .order-card {
        padding: 16px;
    }

    .order-items li {
        flex-wrap: wrap;
        gap: 6px;
        font-size: 13.5px;
    }

    .order-items li > span:first-child {
        flex-basis: 100%;
    }

    .order-status-steps {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        padding-bottom: 6px;
    }

    .order-status-steps::-webkit-scrollbar {
        display: none;
    }

    .order-status-steps span {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 6px 12px;
        font-size: 12px;
    }

    .wishlist-item-card {
        grid-template-columns: 88px 1fr;
        gap: 14px;
        padding: 14px;
    }

    .wishlist-item-info h3 {
        font-size: 14.5px;
        line-height: 1.6;
    }

    .wishlist-item-price {
        font-size: 15px;
    }

    .wishlist-item-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .admin-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 18px;
    }

    .bell-list a {
        padding: 13px 14px;
    }

    .notifications-full-list a span {
        font-size: 13px;
    }

    .notifications-full-list a time {
        font-size: 11px;
    }
}

/* -----------------------------------------------------
   14) MODALS — bottom sheet on small phones
----------------------------------------------------- */
@media (max-width: 520px) {
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .modal {
        max-width: 100%;
        width: 100%;
        border-radius: 22px 22px 0 0;
        padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
        max-height: 88vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-foot {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 8px;
    }

    .modal-foot .btn {
        width: 100%;
        justify-content: center;
        min-height: 46px;
    }
}

/* -----------------------------------------------------
   15) PC BUILDER
----------------------------------------------------- */
@media (max-width: 768px) {
    .builder-hero {
        padding: 28px 0 6px;
    }

    .builder-hero h1 {
        font-size: 24px;
    }

    .builder-hero p {
        font-size: 14px;
    }

    .builder-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 12px 0 40px;
    }

    .builder-slots {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .builder-slot-card {
        padding: 12px;
    }

    .builder-drawer-panel {
        width: 100%;
    }

    .builder-drawer-head {
        padding: 16px 16px 10px;
    }

    .builder-drawer-filters {
        padding: 10px 16px;
        gap: 8px;
    }

    .drawer-search {
        min-width: 100%;
    }

    #pickerBrand {
        width: 100%;
    }

    .builder-drawer-results {
        padding: 12px 16px 24px;
    }

    .builder-actions {
        flex-wrap: wrap;
    }

    .builder-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .builder-live-box {
        padding: 14px;
    }
}

@media (max-width: 420px) {
    .builder-slots {
        grid-template-columns: 1fr;
    }

    .pick-filter-grid {
        grid-template-columns: 1fr;
    }
}

/* -----------------------------------------------------
   16) FOOTER
----------------------------------------------------- */
@media (max-width: 768px) {
    .footer .container {
        padding: 40px 0 24px;
    }

    .footer-grid {
        gap: 26px;
    }

    .footer h2 {
        font-size: 22px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .footer-contact li {
        font-size: 13.5px;
    }
}

/* -----------------------------------------------------
   17) MISC — welcome bar, error pages, grid safety
----------------------------------------------------- */
@media (max-width: 768px) {
    .home-welcome-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .home-welcome-inner .btn {
        width: 100%;
        justify-content: center;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-box {
        padding: 20px 14px;
    }

    .stat-box h2 {
        font-size: 22px;
    }

    .empty-state {
        padding: 36px 18px;
    }

    .error-404-card {
        padding: 32px 16px 24px;
    }

    .staff-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .staff-actions .btn {
        justify-content: center;
    }
}

/* ── Mobile nav dropdown: always visible inline ── */
@media (max-width: 991px) {
    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0 16px;
        list-style: none;
    }

    .nav-dropdown-toggle {
        pointer-events: none;
    }

    .nav-dropdown-arrow {
        display: none;
    }

    .nav-dropdown-item > a {
        padding: 8px 14px;
        font-size: 13px;
    }

    .nav-dropdown-sub {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0 14px;
    }

    .nav-dropdown-all {
        display: none;
    }
}
