/* =====================================================
   KING ICE GOLD — Mobile-First Responsive System
   Breakpoints: 480 / 768 / 1024 / 1280
   ===================================================== */

/* ==================== FLUID TYPOGRAPHY ==================== */
:root {
    --font-size-h1: clamp(1.5rem, 3.5vw + 0.5rem, 3rem);
    --font-size-h2: clamp(1.25rem, 2.5vw + 0.5rem, 2rem);
    --font-size-h3: clamp(1.1rem, 2vw + 0.3rem, 1.5rem);
    --font-size-h4: clamp(0.95rem, 1.5vw + 0.2rem, 1.125rem);
    --font-size-body: clamp(0.875rem, 1vw + 0.25rem, 1rem);
    --font-size-small: clamp(0.72rem, 0.8vw + 0.2rem, 0.85rem);
}

/* ==================== BASE / MOBILE (0 – 479px) ==================== */
/* Everything starts mobile-first, single column */

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

h1 {
    font-size: var(--font-size-h1);
}

h2 {
    font-size: var(--font-size-h2);
}

h3 {
    font-size: var(--font-size-h3);
}

h4 {
    font-size: var(--font-size-h4);
}

/* — Container — */
.container {
    width: 96%;
    padding: 0 var(--spacing-sm);
}

/* — Header — */
.nav-main {
    display: none;
}

.menu-toggle {
    display: flex;
    order: 1;
}

.logo {
    order: 2;
    flex: 1;
    justify-content: center;
}

.logo img {
    height: 34px;
}

.header-right,
.header-icons {
    order: 3;
}

.header-content {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.lang-selector {
    display: none;
}

/* — Top Bar — */
.top-bar-content {
    display: flex;
    justify-content: center;
    text-align: center;
}

.top-bar-links {
    display: none;
}

.top-bar-spacer {
    display: none;
}

/* — Nav Categories — */
.nav-categories ul {
    gap: var(--spacing-md);
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0 var(--spacing-sm);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
}

.nav-categories ul::-webkit-scrollbar {
    display: none;
}

.nav-categories a {
    white-space: nowrap;
    font-size: 0.68rem;
}

/* — Hero — */
.hero {
    height: 75vh;
    min-height: 480px;
    padding-bottom: 50px;
}

.hero-bg-image {
    background-position: center 15%;
    background-size: cover;
}

.hero-title {
    font-size: clamp(1.25rem, 5vw, 2.5rem);
    letter-spacing: 0.12em;
}

.hero-subtitle {
    font-size: 0.85rem;
}

/* — Sections — */
.section {
    padding: var(--spacing-2xl) 0;
}

.page-header h1 {
    font-size: var(--font-size-h1);
    letter-spacing: 0.12em;
}

/* — Grids — all 1-column on mobile — */
.grid-2,
.grid-3,
.grid-4,
.why-grid {
    grid-template-columns: 1fr;
}

/* — Product Grid — */
.products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.product-card-body {
    padding: var(--spacing-sm);
}

.product-card-title {
    font-size: 0.72rem;
}

.product-card-price .amount {
    font-size: 0.85rem;
}

.carousel-track .product-card {
    min-width: 200px;
    max-width: 200px;
}

/* — Product Page — */
.product-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

.product-thumbnails {
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
}

.product-thumbnail {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

/* — Cart — card layout on mobile — */
.cart-layout {
    grid-template-columns: 1fr;
}

.cart-table {
    display: block;
}

.cart-table thead {
    display: none;
}

.cart-table tbody {
    display: block;
}

.cart-table tr {
    display: flex;
    flex-wrap: wrap;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    align-items: center;
}

.cart-table td {
    border: none;
    padding: var(--spacing-xs);
}

.cart-table td:first-child {
    width: 70px;
}

.cart-table td:nth-child(2) {
    flex: 1;
}

/* — Checkout — */
.checkout-layout {
    grid-template-columns: 1fr;
}

.order-summary {
    position: static;
}

.form-row {
    grid-template-columns: 1fr;
}

/* — Confirmation — */
.confirmation-actions {
    flex-direction: column;
}

.confirmation-actions .btn {
    width: 100%;
    text-align: center;
}

/* — Sphere — */
.globe-scene {
    height: 400px;
    overflow: visible;
}

.product-sphere {
    height: 260px;
}

.sphere-ring {
    width: 140px;
    height: 140px;
}

.sphere-card {
    width: 55px;
    height: 68px;
    margin-left: -27px;
    margin-top: -34px;
    transform: rotateY(calc(var(--i) * 45deg)) translateZ(90px);
}

.sphere-card-inner svg {
    width: 18px;
    height: 18px;
}

.sphere-card-inner span {
    font-size: 0.45rem;
}

/* — Category Cards — */
.category-cards-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* — Category Carousel — */
.category-carousel {
    gap: var(--spacing-lg);
}

.cat-circle-icon {
    width: 52px;
    height: 52px;
}

.cat-circle-icon svg {
    width: 20px;
    height: 20px;
}

/* — Intro — */
.intro-title {
    font-size: clamp(1.25rem, 4vw, 2.2rem);
    letter-spacing: 0.12em;
}

.intro-subtitle {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
}

/* — Video Banner — */
.video-banner {
    height: 300px;
    min-height: 280px;
}

.video-banner-content h2 {
    font-size: clamp(1.25rem, 4vw, 2.8rem);
    letter-spacing: 0.1em;
}

/* — Before/After — */
.before-after-container {
    aspect-ratio: 4/3;
}

.ba-placeholder-before svg,
.ba-placeholder-after svg {
    width: 70px;
    height: 70px;
}

/* — Collection Blocks — */
.collection-blocks {
    grid-template-columns: 1fr;
}

.collection-block {
    height: 180px;
}

/* — Bestsellers — */
.bestsellers-grid {
    grid-template-columns: 1fr;
    gap: 32px;
}

.bestsellers-title {
    font-size: 1.5rem;
    margin-bottom: 32px;
}

/* — Newsletter — */
.newsletter-form {
    flex-direction: column;
    gap: var(--spacing-sm);
}

.newsletter-form input[type="email"] {
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.newsletter-content h2 {
    font-size: clamp(1.25rem, 3vw, 2rem);
    letter-spacing: 0.1em;
}

/* — Trust Badges — */
.trust-badges {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

/* — Footer — */
.footer-content {
    grid-template-columns: 1fr;
    text-align: center;
}

.footer-section {
    margin-bottom: var(--spacing-xl);
}

.footer-section h4::after {
    left: 50%;
    transform: translateX(-50%);
}

.footer-social {
    justify-content: center;
}

/* — Floating Buttons — */
.whatsapp-btn {
    bottom: max(16px, env(safe-area-inset-bottom, 16px));
    right: 16px;
    width: 48px;
    height: 48px;
}

.whatsapp-btn svg {
    width: 24px;
    height: 24px;
}

.scroll-to-top {
    bottom: calc(max(16px, env(safe-area-inset-bottom, 16px)) + 56px);
    right: 16px;
    width: 38px;
    height: 38px;
}

/* — Vignettes — */
.vignette-left,
.vignette-right {
    display: none;
}

/* — Search Modal — */
.search-modal {
    padding-top: 60px;
}

.search-modal-content {
    width: 96%;
}

/* — Buttons — */
.btn {
    padding: 12px 20px;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 0.78rem;
}

/* ==================== LARGE PHONE (≥ 480px) ==================== */
@media (min-width: 480px) {
    .container {
        width: 94%;
        padding: 0 var(--spacing-md);
    }

    .logo img {
        height: 38px;
    }

    .products-grid {
        gap: 12px;
    }

    .product-card-body {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .product-card-title {
        font-size: 0.78rem;
    }

    .carousel-track .product-card {
        min-width: 240px;
        max-width: 240px;
    }

    .hero {
        height: 78vh;
        min-height: 480px;
    }

    .hero-bg-image {
        background-position: center 18%;
    }

    .video-banner {
        height: 350px;
        min-height: 320px;
    }

    .globe-scene {
        height: 420px;
    }

    .product-sphere {
        height: 320px;
    }

    .sphere-ring {
        width: 180px;
        height: 180px;
    }

    .sphere-card {
        width: 70px;
        height: 85px;
        margin-left: -35px;
        margin-top: -42px;
        transform: rotateY(calc(var(--i) * 45deg)) translateZ(120px);
    }

    .sphere-card-inner svg {
        width: 24px;
        height: 24px;
    }

    .sphere-card-inner span {
        font-size: 0.55rem;
    }

    .collection-block {
        height: 200px;
    }

    .btn {
        padding: 12px 24px;
    }

    .btn-lg {
        padding: 16px 36px;
        font-size: 0.8rem;
    }

    .nav-categories a {
        font-size: 0.72rem;
    }

    .cat-circle-icon {
        width: 56px;
        height: 56px;
    }

    .cat-circle-icon svg {
        width: 22px;
        height: 22px;
    }

    .product-thumbnail {
        width: 56px;
        height: 56px;
    }
}

/* ==================== TABLET (≥ 768px) ==================== */
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    .container {
        width: 92%;
        padding: 0 var(--spacing-lg);
    }

    .section {
        padding: var(--spacing-3xl) 0;
    }

    /* Header */
    .logo img {
        height: 42px;
    }

    .lang-selector {
        display: inline-flex;
    }

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

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

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .product-card-body {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .product-card-title {
        font-size: 0.8rem;
    }

    .product-card-price .amount {
        font-size: 0.95rem;
    }

    .carousel-track .product-card {
        min-width: 260px;
        max-width: 260px;
    }

    /* Hero */
    .hero {
        height: 65vh;
        min-height: 480px;
    }

    /* Video Banner */
    .video-banner {
        height: 50vh;
        min-height: 400px;
    }

    /* Product page: 2-col on tablet */
    .product-layout {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-2xl);
    }

    .product-thumbnail {
        width: 64px;
        height: 64px;
    }

    /* Cart: restore table on tablet */
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-table {
        display: table;
    }

    .cart-table thead {
        display: table-header-group;
    }

    .cart-table tbody {
        display: table-row-group;
    }

    .cart-table tr {
        display: table-row;
        flex-wrap: initial;
        padding: 0;
        border-bottom: none;
    }

    .cart-table td {
        padding: var(--spacing-lg) var(--spacing-md);
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    }

    .cart-table td:first-child {
        width: auto;
    }

    .cart-table td:nth-child(2) {
        flex: initial;
    }

    /* Checkout */
    .checkout-layout {
        grid-template-columns: 1.5fr 1fr;
    }

    .order-summary {
        position: sticky;
        top: 100px;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    /* Confirmation */
    .confirmation-actions {
        flex-direction: row;
    }

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

    /* Sphere */
    .globe-scene {
        height: 550px;
    }

    .product-sphere {
        height: 400px;
    }

    .sphere-ring {
        width: 250px;
        height: 250px;
    }

    .sphere-card {
        width: 85px;
        height: 100px;
        margin-left: -42px;
        margin-top: -50px;
        transform: rotateY(calc(var(--i) * 45deg)) translateZ(160px);
    }

    /* Category */
    .category-cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .category-carousel {
        gap: var(--spacing-2xl);
    }

    .cat-circle-icon {
        width: 64px;
        height: 64px;
    }

    .cat-circle-icon svg {
        width: 26px;
        height: 26px;
    }

    /* Before/After */
    .before-after-container {
        aspect-ratio: 1/1;
    }

    /* Collection */
    .collection-blocks {
        grid-template-columns: repeat(2, 1fr);
    }

    .collection-block {
        height: 240px;
    }

    /* Bestsellers */
    .bestsellers-grid {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
    }

    .bestsellers-title {
        font-size: 1.75rem;
    }

    /* Newsletter */
    .newsletter-form {
        flex-direction: row;
        gap: 0;
    }

    .newsletter-form input[type="email"] {
        border-right: none;
    }

    /* Trust */
    .trust-badges {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }

    .footer-section h4::after {
        left: 0;
        transform: none;
    }

    .footer-social {
        justify-content: flex-start;
    }

    /* Floating */
    .whatsapp-btn {
        width: 52px;
        height: 52px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-btn svg {
        width: 26px;
        height: 26px;
    }

    .scroll-to-top {
        bottom: 82px;
        right: 20px;
        width: 42px;
        height: 42px;
    }

    /* Search */
    .search-modal {
        padding-top: 100px;
    }

    .search-modal-content {
        width: 90%;
    }

    /* Buttons */
    .btn {
        padding: 14px 32px;
        font-size: 0.78rem;
    }

    .btn-lg {
        padding: 18px 44px;
        font-size: 0.85rem;
    }
}

/* ==================== LAPTOP (≥ 1024px) ==================== */
@media (min-width: 1024px) {
    .container {
        width: 90%;
        max-width: 1200px;
        padding: 0 var(--spacing-xl);
    }

    /* Desktop nav */
    .nav-main {
        display: flex;
    }

    .menu-toggle {
        display: none;
    }

    .logo {
        order: initial;
        flex: initial;
    }

    .logo img {
        height: 48px;
    }

    .header-right,
    .header-icons {
        order: initial;
    }

    .header-content {
        flex-wrap: nowrap;
    }

    /* Top bar */
    .top-bar-content {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
    }

    .top-bar-links {
        display: flex;
    }

    .top-bar-spacer {
        display: block;
    }

    /* Nav categories */
    .nav-categories ul {
        gap: var(--spacing-lg);
        overflow-x: visible;
        justify-content: center;
        padding: 0;
    }

    .nav-categories a {
        font-size: 0.72rem;
    }

    /* Grids */
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .why-grid {
        grid-template-columns: 1fr 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .carousel-track .product-card {
        min-width: 280px;
        max-width: 280px;
    }

    /* Hero */
    .hero {
        height: 80vh;
        min-height: 550px;
        padding-bottom: 80px;
    }

    /* Video Banner */
    .video-banner {
        height: 60vh;
        min-height: 450px;
    }

    /* Sphere */
    .globe-scene {
        height: 650px;
    }

    .product-sphere {
        height: 520px;
    }

    .sphere-ring {
        width: 320px;
        height: 320px;
    }

    /* Product page */
    .product-layout {
        gap: var(--spacing-3xl);
    }

    .product-thumbnail {
        width: 72px;
        height: 72px;
    }

    /* Cart */
    .cart-layout {
        grid-template-columns: 1fr 400px;
    }

    /* Collection */
    .collection-block {
        height: 280px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Vignettes */
    .vignette-left,
    .vignette-right {
        display: block;
    }

    /* Search */
    .search-modal {
        padding-top: 120px;
    }

    /* Floating */
    .whatsapp-btn {
        width: 56px;
        height: 56px;
        bottom: 24px;
        right: 24px;
    }

    .whatsapp-btn svg {
        width: 28px;
        height: 28px;
    }

    .scroll-to-top {
        bottom: 90px;
        right: 24px;
        width: 44px;
        height: 44px;
    }
}

/* ==================== DESKTOP (≥ 1280px) ==================== */
@media (min-width: 1280px) {
    html {
        font-size: 16px;
    }

    .container {
        max-width: 1320px;
    }

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

    .hero {
        height: 85vh;
    }
}

/* ==================== ADMIN RESPONSIVE ==================== */

/* Admin base / mobile */
.admin-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--admin-text);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.admin-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.admin-sidebar-toggle svg {
    width: 24px;
    height: 24px;
}

.admin-sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: calc(var(--z-sticky) - 1);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.admin-sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Admin mobile (base) */
.admin-sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
}

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

.admin-main {
    margin-left: 0;
}

.admin-header {
    padding: 0 var(--spacing-sm);
    gap: var(--spacing-xs);
    flex-wrap: nowrap;
}

.admin-header-title {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.admin-header-actions {
    flex-shrink: 0;
    gap: var(--spacing-xs);
}

.admin-header-actions .admin-btn {
    font-size: 0.7rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    white-space: nowrap;
}

.admin-header-actions .admin-form-select {
    width: auto !important;
    max-width: 140px;
    font-size: 0.75rem;
    padding: var(--spacing-xs) var(--spacing-md);
    padding-right: 28px;
}

.admin-content {
    padding: var(--spacing-sm);
}

.admin-stats {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

.admin-stat-card {
    padding: var(--spacing-md);
}

.admin-stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

.admin-stat-info h3 {
    font-size: 1.25rem;
}

.admin-stat-info p {
    font-size: 0.72rem;
}

.admin-form-row {
    grid-template-columns: 1fr;
}

/* Admin card header — stack on mobile */
.admin-card-header {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
}

.admin-card-title {
    font-size: 0.9rem;
    width: 100%;
}

.admin-card-header .admin-form-select {
    width: 100%;
    font-size: 0.85rem;
}

/* Admin tables — card layout on mobile */
.admin-table {
    display: block;
}

.admin-table thead {
    display: none;
}

.admin-table tbody {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
}

.admin-table tr {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.85rem;
}

.admin-table td:last-child {
    border-bottom: none;
    justify-content: flex-end;
    padding-top: var(--spacing-sm);
}

.admin-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--admin-text-muted);
    margin-right: var(--spacing-md);
    flex-shrink: 0;
}

.admin-table td:last-child::before {
    content: none;
}

.admin-table-image {
    width: 40px;
    height: 40px;
}

/* Admin modal mobile — full-width with safe margins */
.admin-modal {
    width: 96%;
    max-width: none !important;
    max-height: 92vh;
    margin: var(--spacing-sm);
    border-radius: var(--border-radius-md);
}

.admin-modal-header {
    padding: var(--spacing-md);
}

.admin-modal-body {
    padding: var(--spacing-md);
}

.admin-modal-footer {
    padding: var(--spacing-md);
    flex-direction: column;
}

.admin-modal-footer .admin-btn {
    width: 100%;
    justify-content: center;
    padding: var(--spacing-md);
}

/* Admin image upload mobile */
.admin-image-upload {
    padding: var(--spacing-md);
}

.admin-image-preview {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
}

/* Admin login on mobile */
.admin-login-page {
    padding: var(--spacing-md);
}

.admin-login-card {
    padding: var(--spacing-lg);
    max-width: 100%;
}

.admin-login-logo img,
.admin-login-logo svg,
.admin-sidebar-logo img {
    max-width: 100px !important;
}

.admin-login-logo h1 {
    font-size: 1.2rem;
}

/* Admin buttons on mobile — touch-friendly */
.admin-btn {
    min-height: 36px;
}

.admin-btn-icon {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Admin dashboard grid */
.admin-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.admin-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    color: var(--admin-text);
    font-size: 0.9rem;
}

.admin-summary-label {
    color: var(--admin-text-muted);
}

.admin-quick-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
}

.admin-quick-actions .admin-btn {
    justify-content: center;
    text-align: center;
}

/* Admin ≥ 768px */
@media (min-width: 768px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }

    .admin-stat-card {
        padding: var(--spacing-lg);
    }

    .admin-stat-icon {
        width: 50px;
        height: 50px;
    }

    .admin-stat-info h3 {
        font-size: 1.75rem;
    }

    .admin-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }

    .admin-content {
        padding: var(--spacing-lg);
    }

    .admin-header {
        padding: 0 var(--spacing-lg);
        gap: var(--spacing-md);
    }

    .admin-header-title {
        font-size: 1.25rem;
    }

    .admin-header-actions .admin-btn {
        font-size: 0.8rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .admin-header-actions .admin-form-select {
        max-width: 180px;
        font-size: 0.85rem;
        padding: var(--spacing-sm) var(--spacing-md);
        padding-right: 36px;
    }

    /* Admin card header restore */
    .admin-card-header {
        padding: var(--spacing-lg);
    }

    .admin-card-title {
        font-size: 1rem;
        width: auto;
    }

    /* Admin table restores on tablet */
    .admin-table {
        display: table;
    }

    .admin-table thead {
        display: table-header-group;
    }

    .admin-table tbody {
        display: table-row-group;
        padding: 0;
    }

    .admin-table tr {
        display: table-row;
        background: none;
        border-radius: 0;
        padding: 0;
        border: none;
    }

    .admin-table td {
        display: table-cell;
        padding: var(--spacing-md) var(--spacing-lg);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .admin-table td:last-child {
        justify-content: initial;
        padding-top: var(--spacing-md);
    }

    .admin-table td::before {
        content: none;
    }

    .admin-table-image {
        width: 50px;
        height: 50px;
    }

    /* Admin modal restore */
    .admin-modal {
        max-width: 600px !important;
        margin: auto;
        border-radius: var(--border-radius-lg);
    }

    .admin-modal-header {
        padding: var(--spacing-lg);
    }

    .admin-modal-body {
        padding: var(--spacing-lg);
    }

    .admin-modal-footer {
        padding: var(--spacing-lg);
        flex-direction: row;
    }

    .admin-modal-footer .admin-btn {
        width: auto;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    /* Image preview restore */
    .admin-image-upload {
        padding: var(--spacing-xl);
    }

    .admin-image-preview {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    /* Login restore */
    .admin-login-card {
        padding: var(--spacing-2xl);
        max-width: 400px;
    }

    .admin-login-logo img,
    .admin-login-logo svg,
    .admin-sidebar-logo img {
        max-width: 160px !important;
    }

    .admin-login-logo h1 {
        font-size: 1.5rem;
    }

    .admin-quick-actions {
        padding: var(--spacing-lg);
    }
}

/* Admin ≥ 1024px */
@media (min-width: 1024px) {
    .admin-sidebar-toggle {
        display: none;
    }

    .admin-sidebar-backdrop {
        display: none;
    }

    .admin-sidebar {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: var(--admin-sidebar-width);
    }

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

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

    .admin-content {
        padding: var(--spacing-xl);
    }

    .admin-header {
        padding: 0 var(--spacing-xl);
    }

    .admin-modal {
        max-width: 700px !important;
    }
}

/* ==================== UI STATES ==================== */

/* Loading skeleton */
.ui-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl);
    gap: var(--spacing-md);
}

.ui-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(212, 175, 55, 0.15);
    border-top-color: var(--color-primary, #D4AF37);
    border-radius: 50%;
    animation: uiSpin 0.8s linear infinite;
}

@keyframes uiSpin {
    to {
        transform: rotate(360deg);
    }
}

.ui-loading-text {
    font-size: var(--font-size-small, 0.82rem);
    color: var(--color-text-muted, #999);
    letter-spacing: 0.06em;
}

/* Skeleton shimmer placeholders */
.ui-skeleton {
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0.04) 25%,
            rgba(0, 0, 0, 0.08) 50%,
            rgba(0, 0, 0, 0.04) 75%);
    background-size: 200% 100%;
    animation: uiShimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.ui-skeleton--dark {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.04) 25%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: uiShimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes uiShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.ui-skeleton-card {
    aspect-ratio: 1;
    width: 100%;
}

.ui-skeleton-line {
    height: 12px;
    width: 80%;
    margin: var(--spacing-sm) auto;
}

.ui-skeleton-line--short {
    width: 50%;
}

/* Empty state */
.ui-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-lg);
    gap: var(--spacing-md);
}

.ui-empty-icon {
    width: 64px;
    height: 64px;
    color: var(--color-text-subtle, #ccc);
    opacity: 0.6;
}

.ui-empty-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1;
}

.ui-empty-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-body, #444);
}

.ui-empty-text {
    font-size: var(--font-size-small, 0.82rem);
    color: var(--color-text-muted, #999);
    max-width: 320px;
}

.ui-empty-action {
    margin-top: var(--spacing-sm);
}

/* Admin empty (dark theme) */
.ui-empty--dark .ui-empty-icon {
    color: var(--admin-text-muted, #aaa);
}

.ui-empty--dark .ui-empty-title {
    color: var(--admin-text, #eee);
}

.ui-empty--dark .ui-empty-text {
    color: var(--admin-text-muted, #aaa);
}

/* Error state */
.ui-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-lg);
    gap: var(--spacing-md);
}

.ui-error-icon {
    width: 56px;
    height: 56px;
    color: var(--color-error, #e74c3c);
    opacity: 0.7;
}

.ui-error-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

.ui-error-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-body, #444);
}

.ui-error-text {
    font-size: var(--font-size-small, 0.82rem);
    color: var(--color-text-muted, #999);
    max-width: 320px;
}

.ui-error-action {
    margin-top: var(--spacing-sm);
}

/* Admin error (dark theme) */
.ui-error--dark .ui-error-icon {
    color: var(--admin-accent, #E94560);
}

.ui-error--dark .ui-error-title {
    color: var(--admin-text, #eee);
}

.ui-error--dark .ui-error-text {
    color: var(--admin-text-muted, #aaa);
}

/* ==================== SAFE OVERFLOW GUARD ==================== */
img,
video,
iframe,
svg,
canvas {
    max-width: 100%;
    height: auto;
}

table {
    max-width: 100%;
}

pre,
code {
    overflow-x: auto;
    word-break: break-word;
}

/* Prevent horizontal scroll on the entire page */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}