/* UV Resin Sticker Shop - Premium Stylesheet */

:root {
    --bg-main: #090d16;
    --bg-card: rgba(17, 24, 39, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-dark: #111827;

    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.3);
    --secondary: #ec4899;
    --accent: #06b6d4;

    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;

    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Remove default browser spinners from all number inputs */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
textarea,
select {
    font-family: inherit;
    color: inherit;
    background: transparent;
    border: none;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.5em;
}

.gradient-text {
    background: linear-gradient(135deg, #a78bfa 0%, #ec4899 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 13, 22, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.header-top-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.header-top-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.header-top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-nav-row {
    background: rgba(255, 255, 255, 0.01);
}

.header-nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 45px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    position: relative;
    padding: 6px 0;
    transition: color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Navigation Dropdowns */
.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    height: 100%;
}

.nav-links>li {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    padding: 8px 0;
    z-index: 1000;
    list-style: none;
    background: #111827;
    /* solid background fallback */
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    margin-top: 0;
    /* Remove gap completely to prevent hover loss */
}

.nav-links li.has-dropdown:hover .nav-dropdown {
    display: block !important;
    animation: fadeInDown 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nav-dropdown li {
    padding: 0;
    width: 100%;
    position: relative;
}

/* Side Dropdown (Level 3 Category Flyouts) */
.nav-sub-dropdown {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 220px;
    padding: 8px 0;
    z-index: 1001;
    list-style: none;
    background: #111827;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    margin-left: 0;
    /* Align flush with parent */
}

.nav-dropdown li.has-sub-dropdown:hover .nav-sub-dropdown {
    display: block !important;
    animation: fadeInRight 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(6px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-dropdown a {
    display: block;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    color: var(--text-secondary);
    transition: background var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}

.nav-dropdown a:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.nav-dropdown a::after {
    display: none;
}

/* User Account Dropdown */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-icon-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.user-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

.user-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0px);
    min-width: 170px;
    padding: 6px 0;
    z-index: 200;
    border-radius: 12px;
    animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.user-dropdown:hover .user-dropdown-content {
    display: block;
}

.user-dropdown-content a {
    color: var(--text-secondary);
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    font-size: 13px;
    font-weight: 500;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.user-dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.dropdown-header {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 6px 16px;
    max-width: 200px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-box:focus-within {
    max-width: 280px;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.search-box input {
    width: 100%;
    font-size: 14px;
    padding-left: 8px;
}

/* Live AJAX Search Box and Dropdown */
.search-wrapper {
    position: relative;
}

.search-results-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(17, 24, 39, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    z-index: 1000;
    padding: 6px 0;
}

.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-results-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.search-results-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.search-results-dropdown.show {
    display: block;
    animation: fadeInDown 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    transition: background 0.2s ease, transform 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    animation: searchFadeInUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    background: black;
}

.search-result-item:last-of-type {
    border-bottom: none;
}

.search-result-item:hover {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.08), rgba(236, 72, 153, 0.03));
}

.search-result-view-all {
    display: block;
    text-align: center;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease, color 0.2s ease;
    background: black;
}

.search-result-view-all:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--secondary);
}

.search-result-view-all span {
    font-weight: 700;
    color: var(--text-primary);
}

.search-loading,
.search-no-results,
.search-error {
    padding: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mobile-search-dropdown {
    display: none;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

@keyframes searchFadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .mobile-search-dropdown .search-results-dropdown {
        width: 100%;
        left: 0;
        right: 0;
        max-height: 55vh;
        border-radius: 12px;
        background: black;
    }
}

.cart-icon {
    position: relative;
    font-size: 20px;
    padding: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.cart-icon:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bg-main);
}

/* Hero Section */
.hero {
    padding: 35px 0 35px 0;
    text-align: center;
    position: relative;
}

.hero-content {
    /* max-width: 800px; */
    margin: 0 auto;
}

.hero h1 {
    font-size: 56px;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Button UI */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px var(--primary-glow);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Category Section */
.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.category-card {
    padding: 14px;
    text-align: center;
    transition: all var(--transition-smooth);
    cursor: pointer;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.1);
}

.category-card .icon-placeholder {
    display: none;
}

.category-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 14px;
}

.category-image-wrapper img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.category-card:hover .category-image-wrapper img {
    transform: scale(1.05);
}

.category-card h3 {
    font-size: 18px;
    line-height: 1.3;
    margin: 0;
}

/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.product-card {
    overflow: hidden;
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.15);
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-image-wrapper img {
    transition: transform var(--transition-smooth);
    object-fit: contain;
    max-height: 100%;
    width: auto;
}

.product-image-zoom-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.product-image-zoom-trigger img {
    cursor: zoom-in;
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.08);
}

.badge-sale {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #f43f5e, #ec4899);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.3);
}

.product-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.product-category {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    font-weight: 500;
    margin: 0;
}

.product-card-sku {
    font-size: 11px;
    font-family: monospace;
    color: var(--text-secondary);
    opacity: 0.65;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price {
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
}

.price-old {
    color: var(--text-secondary);
    text-decoration: line-through;
    font-size: 14px;
}

.btn-add-cart-quick {
    flex-grow: 1;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(217, 70, 239, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-primary);
}

.btn-add-cart-quick:hover {
    background: linear-gradient(135deg, var(--primary), #d946ef);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    color: white;
}

.product-card-cart-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
}

.product-card-qty-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    height: 40px;
    overflow: hidden;
    width: 100px;
    flex-shrink: 0;
}

.product-card-qty-btn {
    width: 30px;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.product-card-qty-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.product-card-qty-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.product-card-qty {
    width: 40px;
    height: 100%;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    padding: 0;
    margin: 0;
    pointer-events: auto;
    cursor: text;
}

/* Remove default arrows/spinners from number input */
.product-card-qty::-webkit-outer-spin-button,
.product-card-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.product-card-qty[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Shop Page Full-Width Layout */
/* .shop-page-wrapper {
    padding-top: 30px;
} */

.shop-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.shop-page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 0;
}

.shop-sort-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.shop-sort-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 9px 36px 9px 14px;
    font-size: 14px;
    font-family: var(--font-sans);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.shop-sort-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.shop-sort-select option {
    background: #111827;
    color: var(--text-primary);
}

.shop-count {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

/* 4-column grid override for shop page */
.shop-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Product Detail Page */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 5px 0;
    align-items: start;
}

@media (min-width: 993px) {
    .product-detail-left {
        position: sticky;
        top: 130px;
        align-self: start;
    }
}

.product-gallery {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* padding: 40px; */
}

.product-gallery img {
    max-height: 100%;
    object-fit: contain;
}

.product-info-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-info-panel h1 {
    font-size: 40px;
    margin-bottom: 16px;
}

.product-info-panel .price-container {
    margin: 20px 0;
}

.product-info-panel .price {
    font-size: 32px;
}

.product-info-panel .price-old {
    font-size: 20px;
}

.product-meta-item {
    margin-bottom: 12px;
    font-size: 14px;
}

.product-meta-item strong {
    color: var(--text-secondary);
    margin-right: 8px;
}

.product-description {
    color: var(--text-secondary);
    margin: 24px 0;
    line-height: 1.8;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    width: fit-content;
    overflow: hidden;
    margin-bottom: 30px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: background var(--transition-fast);
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.qty-input {
    width: 50px;
    text-align: center;
    font-size: 16px;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    pointer-events: auto;
    cursor: text;
}

/* Cart Page */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    padding: 10px 0;
}

.cart-table-container {
    padding: 30px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    text-align: left;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.cart-table td {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-product-img {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-product-name {
    font-weight: 600;
    font-size: 16px;
}

.cart-product-category {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-remove-item {
    color: var(--error);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.summary-panel {
    padding: 30px;
    height: fit-content;
}

.summary-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 15px;
}

.summary-row.total {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    font-size: 18px;
    font-weight: 700;
}

.checkout-btn {
    width: 100%;
    margin-top: 20px;
    justify-content: center;
}

/* Checkout Page */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    padding: 2px 0;
}

.checkout-form-panel {
    padding: 40px;
}

.checkout-section-title {
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
    transition: border-color var(--transition-fast);
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.1);
}

/* Style select elements specifically for premium layout and visibility */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
    color: var(--text-primary);
}

select.form-control option {
    background-color: #090d16;
    /* Dark background matches --bg-main */
    color: var(--text-primary);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
}

.radio-label:hover {
    background: rgba(255, 255, 255, 0.03);
}

.radio-label input {
    accent-color: var(--primary);
}

.checkout-summary-panel {
    padding: 30px;
    height: fit-content;
}

.checkout-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.checkout-summary-item:last-of-type {
    border-bottom: none;
}

/* Order Success Page */
.success-card {
    max-width: 600px;
    margin: 80px auto;
    padding: 50px 40px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 30px auto;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.success-card h1 {
    font-size: 32px;
    margin-bottom: 16px;
}

.success-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.order-no-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 40px;
}

/* Order Track Page */
.track-card {
    max-width: 500px;
    margin: 80px auto;
    padding: 40px;
}

.track-card h1 {
    font-size: 28px;
    margin-bottom: 24px;
    text-align: center;
}

.track-results {
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.track-status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.track-status-badge.Pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.track-status-badge.Processing {
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary);
}

.track-status-badge.Processing-PP {
    background: rgba(6, 182, 212, 0.2);
    color: var(--accent);
}

.track-status-badge.Shipped {
    background: rgba(6, 182, 212, 0.2);
    color: var(--accent);
}

.track-status-badge.Delivered {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.track-status-badge.Cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    background: rgba(9, 13, 22, 0.9);
    padding: 80px 0 30px 0;
    margin-top: 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-logo span {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Flash Messages */
.flash-message {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.flash-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.flash-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.flash-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Breakpoints */
@media (max-width: 992px) {

    .shop-layout,
    .cart-layout,
    .checkout-layout,
    .product-detail-layout {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

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

    .hero h1 {
        font-size: 40px;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
        /* In production would have a mobile hamburger */
    }

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

    .form-group.full-width {
        grid-column: span 1;
    }
}

/* Sticky bottom mobile navigation menu */
.mobile-footer-nav {
    display: none;
    /* Hidden on desktop */
}

.mobile-overlay-drawer {
    display: none;
}





@media (max-width: 768px) {
    body {
        padding-bottom: 75px;
        /* Make space for sticky bar */
    }

    .product-details {
        padding: 6px;
    }

    .product-card-qty-wrapper {
        width: 80px;
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .category-card {
        padding: 10px;
    }

    .category-card h3 {
        font-size: 14px;
    }

    .user-dropdown {
        display: none;
    }

    .header-nav-container {
        display: none;
    }

    .header-top-actions {
        display: none;
    }

    .header-top-row .search-wrapper {
        display: none;
    }

    .header-top-container {
        place-content: center !important;
    }

    .hero {
        padding: 20px 0 30px 0;
    }

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

    .shop-top-bar {
        gap: 12px;
    }

    .shop-page-title {
        font-size: 20px;
    }

    .mobile-footer-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 65px;
        background: rgba(9, 13, 22, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
        z-index: 999;
        justify-content: space-around;
        align-items: center;
        padding: 5px 10px;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        font-size: 11px;
        font-weight: 500;
        background: transparent;
        border: none;
        cursor: pointer;
        transition: color var(--transition-fast);
        flex-grow: 1;
        gap: 4px;
        height: 100%;
        padding: 4px 0;
    }

    .mobile-nav-item svg {
        width: 22px;
        height: 22px;
        transition: transform var(--transition-fast);
    }

    .mobile-nav-item:hover,
    .mobile-nav-item:focus {
        color: var(--text-primary);
    }

    .mobile-nav-item:active svg {
        transform: scale(0.9);
    }

    /* Cart counter badge specifically for mobile bottom bar */
    .mobile-cart-badge {
        position: absolute;
        top: -6px;
        right: -8px;
        background: linear-gradient(135deg, var(--secondary), var(--primary));
        color: white;
        font-size: 9px;
        font-weight: 700;
        border-radius: 50%;
        width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #090d16;
    }

    /* Mobile fullscreen navigation drawer */
    .mobile-overlay-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: -100%;
        /* Hidden on left side */
        width: 100%;
        height: 100%;
        background: rgba(9, 13, 22, 0.99);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 1000;
        transition: left var(--transition-smooth);
        padding: 24px;
    }

    .mobile-overlay-drawer.open {
        left: 0;
        /* Slide in */
    }

    .mobile-overlay-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 16px;
        margin-bottom: 24px;
    }

    .close-overlay-btn {
        font-size: 32px;
        color: var(--text-secondary);
        background: transparent;
        border: none;
        cursor: pointer;
        line-height: 1;
    }

    .close-overlay-btn:hover {
        color: var(--text-primary);
    }

    .mobile-overlay-body {
        flex-grow: 1;
        overflow-y: auto;
    }

    .mobile-menu-links {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .mobile-menu-links li a {
        font-size: 18px;
        font-weight: 600;
        display: block;
        padding: 4px 0;
    }

    .mobile-menu-links li.separator {
        height: 1px;
        background: var(--border-color);
        margin: 10px 0;
    }

    /* Mobile Drawer Submenus */
    .mobile-nav-parent {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .mobile-nav-parent a {
        flex-grow: 1;
    }

    .mobile-dropdown-toggle {
        background: transparent;
        border: none;
        color: var(--text-secondary);
        font-size: 18px;
        padding: 10px 15px;
        cursor: pointer;
        transition: color var(--transition-fast);
    }

    .mobile-dropdown-toggle:hover {
        color: var(--text-primary);
    }

    .mobile-submenu {
        display: none;
        list-style: none;
        padding-left: 20px;
        margin-top: 5px;
        margin-bottom: 10px;
        border-left: 1px solid var(--border-color);
    }

    .mobile-submenu li {
        margin: 8px 0;
    }

    .mobile-submenu a {
        font-size: 14px;
        color: var(--text-secondary);
    }

    .mobile-category-links {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 10px;
    }

    .mobile-category-links li a {
        font-size: 15px;
        color: var(--text-secondary);
        display: block;
    }

    /* Slide-down search overlay */
    .mobile-search-dropdown {
        display: block;
        position: fixed;
        top: -120px;
        /* Start offscreen */
        left: 0;
        right: 0;
        background: rgba(9, 13, 22, 0.96);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 1px solid var(--border-color);
        padding: 16px 24px;
        z-index: 998;
        transition: top var(--transition-smooth);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .mobile-search-dropdown.open {
        top: 0;
        /* Slide down */
    }

    /* Cart Table Mobile Optimization */
    .cart-table thead {
        display: none;
    }

    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        display: grid;
        grid-template-areas:
            "product product"
            "qty price";
        grid-template-columns: 1fr auto;
        gap: 16px;
        align-items: center;
        border-bottom: 1px solid var(--border-color);
        padding: 20px 0;
    }

    .cart-table td {
        padding: 0 !important;
        border-bottom: none;
    }

    .cart-table td:nth-child(1) {
        grid-area: product;
    }

    .cart-table td:nth-child(2) {
        grid-area: qty;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .cart-table td:nth-child(3) {
        grid-area: price;
        text-align: right !important;
        font-size: 18px !important;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .cart-table-container {
        padding: 20px !important;
    }
}

/* Floating Toast Notifications */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 380px;
    width: calc(100% - 48px);
}

.toast-message {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 20px;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.toast-message.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-message.fade-out {
    transform: translateY(-20px);
    opacity: 0;
}

.toast-success {
    border-left: 4px solid var(--primary);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
}

.toast-danger {
    border-left: 4px solid var(--error);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.15);
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

/* Loading state for quick add button */
.loading-dots {
    display: inline-block;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

/* Spinner Loader for Buttons */
.spinner-btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.spinner-btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-spin 0.6s linear infinite;
}

@keyframes button-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}