/* CSS VARIABLES FOR PREMIUM THEME */
:root {
    --bg-dark: #080b11;
    --bg-sidebar: rgba(13, 17, 28, 0.6);
    --card-bg: rgba(20, 26, 42, 0.45);
    --card-border: rgba(255, 255, 255, 0.05);
    --card-border-hover: rgba(251, 191, 36, 0.35);
    --text-main: #f3f4f6;
    --text-muted: #8e9bb0;
    --primary: #fbbf24; /* Gold amber */
    --primary-rgb: 251, 191, 36;
    --primary-glow: rgba(251, 191, 36, 0.15);
    --accent: #a855f7; /* Tím neon */
    --accent-glow: rgba(168, 85, 247, 0.12);
    --success: #10b981;
    --danger: #ef4444;
    
    --font-outfit: 'Outfit', sans-serif;
    --font-jakarta: 'Plus Jakarta Sans', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-blur: blur(20px);
}

/* RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-jakarta);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* BACKGROUND GLASS DECORATIONS */
.glass-bg-decor {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

.glass-bg-decor.1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
}

.glass-bg-decor.2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.08) 0%, transparent 70%);
}

.glass-bg-decor.3 {
    top: 40%;
    left: 45%;
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
}

/* LAYOUT CONTAINER */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    max-width: 1800px;
    margin: 0 auto;
}

/* SIDEBAR STYLES */
.sidebar {
    width: 340px;
    background: var(--bg-sidebar);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--card-border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo i.icon-liquid {
    font-size: 24px;
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary));
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.brand-logo h2 {
    font-family: var(--font-outfit);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand-logo h2 span {
    color: var(--primary);
}

#close-sidebar-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
    display: none;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom Scrollbar for Sidebar */
.sidebar-content::-webkit-scrollbar {
    width: 5px;
}
.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* BUTTONS & INPUTS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: var(--font-jakarta);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #d97706 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.45);
}

.btn-primary-outline {
    background: rgba(251, 191, 36, 0.05);
    border-color: rgba(251, 191, 36, 0.2);
    color: var(--primary);
}
.btn-primary-outline:hover {
    background: rgba(251, 191, 36, 0.15);
    border-color: var(--primary);
}

.btn-clear-filters {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--danger);
    width: 100%;
    margin-bottom: 24px;
}
.btn-clear-filters:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
}

.btn-danger-outline {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}
.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger);
}

/* FILTER GROUPS */
.filter-group {
    margin-bottom: 24px;
}

.filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    padding: 12px 40px 12px 14px;
    border-radius: 10px;
    color: var(--text-main);
    font-family: var(--font-jakarta);
    font-size: 14px;
    transition: var(--transition);
}
.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

#clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: none;
    font-size: 14px;
}

/* GENDER BUTTON FILTERS */
.gender-filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.gender-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    padding: 10px;
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}
.gender-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}
.gender-btn.active {
    background: rgba(251, 191, 36, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* CHECKBOX STYLES */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500 !important;
    text-transform: none !important;
    color: var(--text-main) !important;
    user-select: none;
}
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    transition: var(--transition);
}
.checkbox-container:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.08);
}
.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}
.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-dropdown {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    padding: 12px;
    border-radius: 10px;
    color: var(--text-main);
    font-family: var(--font-jakarta);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}
.filter-dropdown:focus {
    border-color: var(--primary);
}
.filter-dropdown option {
    background-color: #0d111c;
    color: var(--text-main);
}

/* BRAND LIST SECTION */
.brand-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.brand-actions {
    display: flex;
    gap: 6px;
    font-size: 11px;
}
.brand-actions button {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
}
.brand-actions button:hover {
    text-decoration: underline;
}
.brand-actions span {
    color: rgba(255, 255, 255, 0.1);
}

.brand-search-box {
    margin-bottom: 10px;
}
.brand-search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-main);
    font-size: 12px;
}

.brand-list-wrapper {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 8px;
}
.brand-list-wrapper::-webkit-scrollbar {
    width: 4px;
}
.brand-list-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.brand-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
}
.brand-item:hover {
    background: rgba(255, 255, 255, 0.04);
}
.brand-item.active {
    background: rgba(251, 191, 36, 0.08);
    color: var(--primary);
    font-weight: 600;
}
.brand-item .count {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 10px;
    color: var(--text-muted);
}
.brand-item.active .count {
    background: rgba(251, 191, 36, 0.15);
    color: var(--primary);
}

.sidebar-mobile-footer {
    padding-top: 15px;
    border-top: 1px solid var(--card-border);
    margin-top: auto;
    display: none;
}

/* MAIN CONTENT AREA */
.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.main-header {
    margin-bottom: 32px;
}

.header-main-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.header-title h1 {
    font-family: var(--font-outfit);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}
.header-title p {
    color: var(--text-muted);
    font-size: 14px;
}

#open-sidebar-btn {
    display: none;
}

/* QUICK STATS */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-muted);
}

.stat-info {
    display: flex;
    flex-direction: column;
}
.stat-info .num {
    font-family: var(--font-outfit);
    font-size: 24px;
    font-weight: 700;
}
.stat-info .label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* TOOLBAR */
.catalog-toolbar {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 15px;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}
.results-count {
    font-size: 14px;
    color: var(--text-muted);
}
.results-count span {
    color: var(--text-main);
    font-weight: 600;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-size-selector span {
    font-size: 13px;
    color: var(--text-muted);
}

.sort-dropdown {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-jakarta);
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

#btn-copy-post {
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

/* PRODUCT GRID */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* PRODUCT CARD */
.product-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--card-border-hover);
    box-shadow: 0 12px 30px rgba(251, 191, 36, 0.06);
}

/* Card Selection Button */
.card-select-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}
.card-select-btn:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: var(--primary);
    color: var(--primary);
}
.card-select-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Product Image Frame */
.product-img-frame {
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.product-img-frame img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-frame img {
    transform: scale(1.06);
}

/* Gender Badges */
.gender-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}
.gender-badge.LNM {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}
.gender-badge.LNF {
    background: rgba(236, 72, 153, 0.15);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: #fbcfe8;
}
.gender-badge.LNU {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #e9d5ff;
}

/* Product Details */
.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-brand {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.product-title {
    font-family: var(--font-outfit);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 44px; /* Fixed height for 2 lines */
}

/* Size Option Selectors */
.size-selectors {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.size-option-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-jakarta);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}
.size-option-btn:hover {
    color: var(--text-main);
}
.size-option-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.size-option-btn.disabled {
    opacity: 0.25;
    pointer-events: none;
}

/* Prices */
.price-section {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.sell-price {
    font-family: var(--font-outfit);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

.unit {
    font-size: 12px;
    color: var(--text-muted);
}

/* Old Comparison Price */
.old-price-reference {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.old-price-reference span {
    font-weight: 600;
}
.old-price-reference span.price-diff-down {
    color: var(--success);
}
.old-price-reference span.price-diff-up {
    color: var(--danger);
}

/* LOADING & EMPTY STATES */
.loading-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    color: var(--text-muted);
    gap: 15px;
}
.loading-state i {
    font-size: 32px;
    color: var(--primary);
}
.loading-state p {
    font-size: 15px;
    font-weight: 500;
}

/* PAGINATION */
.pagination-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-link {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: var(--font-outfit);
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    user-select: none;
}
.page-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}
.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}
.page-link.disabled {
    opacity: 0.3;
    pointer-events: none;
}
.page-dots {
    color: var(--text-muted);
    padding: 0 4px;
}

/* TOAST NOTIFICATION */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translate(-50%, 100px);
    background: rgba(13, 18, 30, 0.95);
    border: 1px solid var(--primary);
    backdrop-filter: blur(10px);
    padding: 16px 28px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(251, 191, 36, 0.15);
    z-index: 1000;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
    pointer-events: none;
}

.toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.toast-icon {
    font-size: 20px;
    color: var(--primary);
}

.toast-message {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

/* BACK TO TOP BUTTON */
#back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(13, 18, 30, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--card-border);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 99;
    pointer-events: none;
}
#back-to-top-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
#back-to-top-btn:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

/* OVERLAY FOR MOBILE */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 90;
}
.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        left: -340px;
        top: 0;
        bottom: 0;
        height: 100vh;
        z-index: 999;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    #close-sidebar-btn {
        display: block;
    }
    
    .sidebar-mobile-footer {
        display: block;
    }
    
    .main-content {
        padding: 24px;
    }
    
    #open-sidebar-btn {
        display: inline-flex;
    }
}

@media (max-width: 768px) {
    .quick-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left, .toolbar-right {
        justify-content: space-between;
    }
    
    .header-main-row {
        align-items: center;
    }
    
    .header-title h1 {
        font-size: 22px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
}
