/* UF13 Store — mobile-first responsive foundation */

/* ── Global (mobile base) ── */
html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    max-width: 100%;
}

img,
video,
svg {
    max-width: 100%;
    height: auto;
}

.container,
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ── Storefront navigation ── */
.navbar .container {
    gap: 0.5rem;
}

.navbar-brand {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    max-width: calc(100% - 52px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-brand img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    flex-shrink: 0;
}

.navbar-collapse .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.navbar-nav .nav-link {
    padding: 0.65rem 0;
}

.navbar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    padding-top: 0.75rem;
}

.navbar-actions .btn {
    width: 100%;
    margin: 0;
}

/* ── Storefront hero & content ── */
.hero .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.hero p {
    font-size: clamp(0.95rem, 2.8vw, 1.15rem);
    line-height: 1.7;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: clamp(1.35rem, 4vw, 1.75rem);
}

.product-card img {
    width: 100%;
    object-fit: cover;
}

.filters-row > [class*="col-"] {
    margin-bottom: 0.75rem;
}

.filters-row > [class*="col-"]:last-child {
    margin-bottom: 0;
}

/* ── Customer dashboard ── */
.customer-nav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    justify-content: flex-end;
}

.customer-nav-actions .btn {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 0.45rem 0.65rem;
}

.card-stat {
    padding: 1.25rem;
}

.card-stat i {
    font-size: 2rem;
}

.quick-action {
    padding: 1.25rem;
    flex-direction: column;
    text-align: center;
}

.quick-action i {
    font-size: 2rem;
}

/* ── Admin: mobile top bar & sidebar ── */
.admin-mobile-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #06142e;
    border-bottom: 1px solid rgba(77, 166, 255, 0.35);
    position: sticky;
    top: 0;
    z-index: 1040;
}

.admin-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(77, 166, 255, 0.45);
    border-radius: 12px;
    background: rgba(11, 35, 77, 0.9);
    color: #4da6ff;
    font-size: 1.4rem;
    cursor: pointer;
    flex-shrink: 0;
}

.admin-mobile-title {
    font-weight: 800;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1045;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.admin-nav-open .sidebar-backdrop {
    display: block;
    opacity: 1;
}

body.admin-nav-open {
    overflow: hidden;
}

/* Mobile admin layout */
.dashboard .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(280px, 88vw);
    z-index: 1050;
    transform: translateX(-110%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

body.admin-nav-open .dashboard .sidebar {
    transform: translateX(0);
}

.dashboard .content {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
}

.admin-page,
.admin-shell {
    min-height: 100vh;
    background: #020b19;
    color: #ffffff;
}

.admin-page {
    padding: 1rem;
}

.topbar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 1rem;
    padding: 1.25rem;
}

.topbar h1 {
    font-size: clamp(1.35rem, 5vw, 2rem);
}

.btn-store {
    display: block;
    text-align: center;
}

.top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    text-align: center;
}

.top h2 {
    font-size: clamp(1.25rem, 4.5vw, 1.75rem);
}

.btn-back {
    display: inline-block;
    text-align: center;
}

.panel,
.form-box {
    padding: 1.25rem;
    border-radius: 18px;
}

.stats {
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Tables — scroll inside wrapper only */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.table {
    min-width: 560px;
    font-size: 0.9rem;
}

.table th,
.table td {
    white-space: nowrap;
}

.table .product-info,
.table td:last-child {
    white-space: normal;
}

/* Order status form stacks on mobile */
.order-status-form {
    flex-direction: column !important;
    align-items: stretch !important;
}

.order-status-form .form-select,
.order-status-form .btn-update {
    width: 100%;
}

/* Size stock grid */
.size-grid > [class*="col-"] {
    flex: 0 0 33.333%;
    max-width: 33.333%;
}

/* Inventory table needs wider min */
.inventory-table {
    min-width: 720px;
}

/* Auth login (classes used when auth.css linked) */
.auth-wrapper {
    min-height: auto;
    grid-template-columns: 1fr;
    border-radius: 20px;
}

.brand-side,
.form-side {
    padding: 2rem 1.25rem;
}

.brand-title {
    font-size: clamp(2.5rem, 10vw, 4.5rem);
}

.form-side {
    padding: 2.5rem 1.25rem;
}

.form-title {
    font-size: clamp(1.6rem, 5vw, 2.4rem);
}

.input-group-custom input {
    height: 58px;
    font-size: 1rem;
    padding: 0 3rem 0 2.75rem;
}

.btn-login {
    height: 58px;
    font-size: 1.05rem;
}

/* ── Tablet (576px+) ── */
@media (min-width: 576px) {
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .customer-nav-actions .btn {
        flex: 0 1 auto;
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .quick-action {
        flex-direction: row;
        text-align: right;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .size-grid > [class*="col-"] {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .admin-page {
        padding: 1.5rem;
    }

    .dashboard .content {
        padding: 1.5rem;
    }
}

/* ── Tablet landscape (768px+) ── */
@media (min-width: 768px) {
    .navbar-collapse .btn {
        width: auto;
        margin-top: 0;
    }

    .navbar-actions {
        flex-direction: row;
        width: auto;
        padding-top: 0;
    }

    .navbar-actions .btn {
        width: auto;
    }

    .customer-nav-actions {
        width: auto;
    }

    .topbar {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .top {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .btn-store {
        display: inline-block;
    }

    .order-status-form {
        flex-direction: row !important;
        align-items: center !important;
    }

    .order-status-form .form-select {
        width: auto;
        min-width: 130px;
    }

    .order-status-form .btn-update {
        width: auto;
    }

    .auth-wrapper {
        grid-template-columns: 1fr 1fr;
        min-height: 640px;
    }

    .brand-side,
    .form-side {
        padding: 2.5rem;
    }
}

/* ── Laptop (992px+) ── */
@media (min-width: 992px) {
    .admin-mobile-bar,
    .sidebar-backdrop {
        display: none !important;
    }

    .dashboard .sidebar {
        transform: none;
        width: 280px;
    }

    body.admin-nav-open {
        overflow: auto;
    }

    .dashboard .content {
        margin-left: 280px;
        width: calc(100% - 280px);
        padding: 2rem;
    }

    .admin-page {
        padding: 2rem;
    }

    .size-grid > [class*="col-"] {
        flex: 0 0 16.666%;
        max-width: 16.666%;
    }

    .table {
        font-size: 1rem;
    }
}

/* ── Desktop (1200px+) ── */
@media (min-width: 1200px) {
    .dashboard .content {
        padding: 2.25rem;
    }

    .container-box,
    .form-box-wrap {
        max-width: 1200px;
    }
}

/* ── UF13 Store responsive refinements ── */
.store-main {
    width: 100%;
    overflow-x: clip;
    position: relative;
    z-index: 0;
}

@media (max-width: 767.98px) {
    .store-hero-actions {
        flex-direction: column;
        align-items: stretch;
        padding-inline: 0.75rem;
    }

    .store-hero-actions .btn {
        width: 100%;
    }

    .store-theme .product-card h5 {
        font-size: 1rem;
    }

    .store-theme .product-img {
        height: 170px;
    }

    .luxury-section-head h2,
    .store-section-title {
        font-size: clamp(1.2rem, 5.5vw, 1.55rem);
    }

    .store-footer-tag {
        margin-top: 0.5rem;
        line-height: 1.5;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .store-theme .product-img {
        height: 190px;
    }
}

@media (max-width: 380px) {
    .store-brand-text {
        font-size: 0.95rem;
    }

    .store-navbar-brand img {
        width: 38px;
        height: 38px;
    }
}
