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

html {
    overflow-x: hidden;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

.sidebar {
    width: 260px;
    min-width: 260px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    position: fixed;
    left: 0;
    top: 72px;
    height: calc(100vh - 72px);
    overflow-y: auto;
    z-index: 100;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/arkaplan/lazer-desen-arka-plan.svg') center/cover;
    z-index: -1;
}

.sidebar-nav {
    flex: 1;
}

.nav-item, .footer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 15px;
    font-weight: 600;
}

.nav-item:hover, .footer-link:hover {
    background: #f3f4f6;
    color: #111827;
}

.nav-item.active {
    background: #f0fdf4;
    color: #10b981;
    border-right: 3px solid #10b981;
}

.nav-item i, .footer-link i {
    width: 20px;
    font-size: 18px;
}

.sidebar-footer {
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
    margin-top: 16px;
}

.sidebar-bottom {
    padding: 16px 24px;
    font-size: 11px;
    color: #9ca3af;
}

.sidebar-bottom .links {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.sidebar-bottom a {
    color: #6b7280;
    text-decoration: none;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: 0;
    overflow-x: hidden;
}

.top-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 72px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 200px;
    height: auto;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 16px;
    position: relative;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: transparent;
}

.cart-btn {
    position: relative;
}

.cart-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #10b981;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.btn-seller {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-seller:hover {
    background: #059669;
}

.avatar {
    font-size: 24px;
}

.category-filters {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    padding: 10px 40px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 2px solid #e5e7eb;
    position: fixed;
    top: 72px;
    left: 260px;
    right: 0;
    z-index: 150;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-filters:hover .scroll-arrow {
    opacity: 1;
}

.filters-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    mask-image: linear-gradient(to right, black calc(100% - 60px), transparent);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 60px), transparent);
}

.filters-wrapper::-webkit-scrollbar {
    display: none;
}

.scroll-arrow {
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 14px;
    transition: all 0.3s;
    opacity: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.scroll-arrow:hover {
    background: #111827;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.filter-btn {
    padding: 5px 18px;
    border: 1px solid #b8b8b8;
    background: #dadada;
    border-radius: 25px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    transition: all 0.3s;
    position: relative;
}

.filter-btn:hover {
    background: #f9fafb;
    color: #111827;
    border-color: #10b981;
}

.filter-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border-color: #10b981;
}



.grid-toggle {
    display: block;
}

@media (max-width: 768px) {
    .grid-toggle {
        display: none;
    }
}

.products-grid {
    padding: 40px 40px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    background: #f8f9fa;
    margin-left: 260px;
    margin-top: 120px;
}

/* Skeleton Loader */
.skeleton-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.skeleton-preview {
    width: 100%;
    height: 320px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-info {
    padding: 24px;
    display: flex;
    gap: 12px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    flex-shrink: 0;
}

.skeleton-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-line.short {
    width: 60%;
    height: 14px;
}

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

.product-card {
    display: none;
}

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

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

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

@media (max-width: 768px) {
    .products-grid.grid-2,
    .products-grid.grid-3,
    .products-grid.grid-4 {
        grid-template-columns: 1fr !important;
    }
}

.products-grid.list-view {
    grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
    display: flex;
    flex-direction: row;
}

.products-grid.list-view .product-preview {
    width: 400px;
    height: auto;
    min-height: 200px;
}

.products-grid.list-view .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    transform: translateY(-8px);
    border-color: #d1d5db;
}

.product-preview {
    width: 100%;
    height: 320px;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s;
}

.product-card:hover .product-image {
    filter: blur(4px);
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 2;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.btn-preview, .btn-details {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.btn-preview {
    background: rgba(255, 255, 255, 0.95);
    color: #111827;
}

.btn-preview:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn-details {
    background: rgba(16, 185, 129, 0.95);
    color: #fff;
}

.btn-details:hover {
    background: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.4);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ef4444;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
}

.product-badge:contains("Free") {
    background: #10b981;
}



.product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(218, 218, 218, 0.98), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 15;
}

.product-card:hover .product-info {
    opacity: 1;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.product-left {
    display: flex;
    gap: 12px;
    flex: 1;
}

.author-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-details h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-details p {
    font-size: 14px;
    color: #6b7280;
}

.product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.price {
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
    background: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 6px;
}

.old-price {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
}

.load-more-container {
    padding: 24px;
    text-align: center;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    margin-left: 260px;
}

.btn-load-more {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-load-more:hover {
    background: #059669;
}

/* Auth Modal */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s;
}

.auth-overlay.active {
    display: flex;
}

.auth-modal {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 460px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s;
}

.auth-form {
    padding: 40px 40px 32px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.auth-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/arkaplan/lazer-desen-arka-plan.svg');
    background-size: 450%;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.auth-form::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255,255,255,0));
    z-index: 0;
}

.auth-form > * {
    position: relative;
    z-index: 1;
}

@media (min-width: 640px) {
    .auth-form {
        padding: 40px 32px 32px;
    }
}

@media (min-width: 1024px) {
    .auth-form {
        padding: 48px;
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.close-modal:hover {
    background: #e5e7eb;
    color: #111827;
}

.auth-form h2 {
    font-size: 19px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: #6b7280;
    margin-bottom: 24px;
    font-size: 14px;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.social-btn {
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    color: #fff;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.social-btn.google {
    background: #ea4335;
}

.social-btn.google:hover {
    background: #d33426;
}

.social-btn.facebook {
    background: #1877f2;
}

.social-btn.facebook:hover {
    background: #0c63d4;
}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #9ca3af;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    padding: 0 16px;
}

.auth-form form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form input {
    padding: 17px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 19px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.5);
}

.auth-form input:focus {
    outline: none;
    border-color: #10b981;
    background: rgba(255, 255, 255, 0.7);
}

.password-wrapper {
    position: relative;
    width: 100%;
    z-index: 2;
}

.password-wrapper input {
    width: 100%;
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 17px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    transition: color 0.2s;
    z-index: 100;
    pointer-events: auto;
}

.toggle-password:hover {
    color: #10b981;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -8px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.remember-me input[type="checkbox"]:checked {
    background: #10b981;
    border-color: #10b981;
}

.remember-me input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.forgot-password {
    color: #10b981;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: auto;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-switch {
    text-align: center;
    margin-top: 32px;
    color: #6b7280;
    font-size: 14px;
}

.auth-switch a {
    color: #10b981;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-subtitle a {
    color: #10b981;
}

.remember-me {
    color: #10b981;
}

.btn-submit {
    padding: 14px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-submit:hover {
    background: #059669;
}



@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
    .products-grid.grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .products-grid.grid-4 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
    .products-grid.grid-2,
    .products-grid.grid-3,
    .products-grid.grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .products-grid.grid-2,
    .products-grid.grid-3,
    .products-grid.grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .sidebar {
        position: fixed;
        left: -260px;
        top: 72px;
        height: calc(100vh - 72px);
        z-index: 1000;
        transition: left 0.3s;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .top-header {
        padding: 12px 16px;
        height: 60px;
    }
    
    .logo img {
        width: 140px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .btn-seller {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .category-filters {
        left: 0;
        padding: 12px 16px;
        top: 60px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .scroll-arrow {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .products-header,
    .products-grid,
    .load-more-container {
        margin-left: 0;
    }
    
    .products-grid {
        margin-top: 110px;
        padding: 16px;
        gap: 16px;
    }
    
    .products-grid,
    .products-grid.grid-2,
    .products-grid.grid-3,
    .products-grid.grid-4 {
        grid-template-columns: 1fr !important;
    }
    
    .product-card {
        border-radius: 16px;
    }
    
    .product-preview {
        height: 220px;
    }
    
    .product-info {
        padding: 16px;
    }
    
    .author-badge {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .product-details h3 {
        font-size: 14px;
    }
    
    .product-details p {
        font-size: 12px;
    }
    
    .price {
        font-size: 16px;
    }
    
    .old-price {
        font-size: 12px;
    }
    
    .btn-preview, .btn-details, .btn-add-cart, .btn-download {
        padding: 10px 18px;
        font-size: 12px;
        gap: 6px;
    }
    
    .products-grid.list-view .product-card {
        flex-direction: column;
    }
    
    .products-grid.list-view .product-preview {
        width: 100%;
        height: 220px;
    }
    
    .load-more-container {
        padding: 16px;
    }
    
    .btn-load-more {
        width: 100%;
        padding: 14px;
    }
}

/* Product Preview Modal */
.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s;
}

.preview-overlay.active {
    display: flex;
}

.preview-modal {
    background: #fff;
    border-radius: 6px;
    width: 90%;
    max-width: 1200px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.preview-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
}

.preview-modal-title h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-modal-title .author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0;
}

.preview-modal-title span {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.close-preview {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.close-preview:hover {
    background: #e5e7eb;
    color: #111827;
}

.preview-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    flex: 1;
    overflow: hidden;
}

.preview-left-section {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    position: relative;
    overflow: hidden;
}

.preview-left-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/arkaplan/lazer-desen-arka-plan.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.preview-left-section > * {
    position: relative;
    z-index: 1;
}

.preview-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gallery-main {
    position: relative;
    aspect-ratio: 16/10;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    pointer-events: none;
}

.gallery-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    font-size: 14px;
    transition: all 0.2s;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery-btn:hover {
    background: #10b981;
    color: #fff;
    transform: scale(1.1);
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px;
}

.gallery-thumbs::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.gallery-thumb:hover {
    border-color: #10b981;
}

.gallery-thumb.active {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16,185,129,0.2);
}

.preview-description {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.preview-description p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
}

.preview-info {
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    background: #fafafa;
}

.preview-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.author-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.author-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.author-info p {
    color: #6b7280;
    font-size: 13px;
}



.preview-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
}

.btn-preview-action {
    padding: 14px 20px;
    border: 2px solid #e5e7eb;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    color: #374151;
}

.btn-preview-action:hover {
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.btn-preview-action.primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border-color: #10b981;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.btn-preview-action.primary:hover {
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

@media (max-width: 1024px) {
    .preview-modal {
        width: 95%;
        max-width: 900px;
    }
    
    .preview-content {
        grid-template-columns: 1fr;
    }
    
    .preview-left-section {
        padding: 24px;
        max-height: 50vh;
    }
    
    .preview-image {
        min-height: 250px;
    }
    
    .preview-image img {
        max-height: 400px;
    }
    
    .preview-info {
        padding: 24px;
        max-height: 50vh;
    }
}

@media (max-width: 768px) {
    .preview-modal {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .preview-content {
        grid-template-columns: 1fr;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .preview-left-section {
        padding: 16px;
        max-height: none;
        overflow-y: visible;
    }
    
    .preview-image {
        min-height: 200px;
        padding: 12px;
    }
    
    .preview-image img {
        max-height: 300px;
    }
    
    .preview-thumbnails {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .preview-thumb {
        height: 50px;
    }
    
    .preview-info {
        padding: 16px;
        max-height: none;
        overflow-y: visible;
    }
    
    .preview-info h2 {
        font-size: 18px !important;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .author-info h3 {
        font-size: 14px !important;
    }
    
    .close-preview {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
        font-size: 16px;
        position: fixed;
    }
    
    .preview-actions {
        gap: 8px;
        position: sticky;
        bottom: 0;
        background: #fafafa;
        padding: 16px 0;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
        border-top: 1px solid #e5e7eb;
    }
    
    .btn-preview-action {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .preview-meta-list {
        gap: 12px;
        padding: 16px 0;
    }
    
    .meta-row {
        flex-wrap: wrap;
    }
    
    .meta-row .meta-label {
        font-size: 10px;
    }
    
    .meta-row .meta-value {
        font-size: 13px;
    }
}

/* Preview Meta List */
.preview-meta-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 0;
    border-top: 2px solid #e5e7eb;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.meta-row .meta-label {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.meta-row .meta-value {
    font-size: 15px;
    color: #111827;
    font-weight: 600;
    text-align: right;
}



.btn-add-cart,
.btn-download {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    background: rgba(16, 185, 129, 0.95);
    color: #fff;
}

.btn-add-cart:hover,
.btn-download:hover {
    background: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.4);
}

.btn-add-cart.added,
.btn-buy.added {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3) !important;
}

.btn-add-cart.added:hover,
.btn-buy.added:hover {
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.4) !important;
}

.btn-preview-action.primary[style*="#ef4444"] {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3) !important;
}

.btn-preview-action.primary[style*="#ef4444"]:hover {
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.4) !important;
}

@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .auth-modal {
        width: 95%;
        max-width: 100%;
        margin: 0 10px;
    }
    
    .auth-form {
        padding: 24px;
    }
    
    .auth-form h2 {
        font-size: 22px;
    }
    
    .social-btn {
        font-size: 13px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 10px 12px;
        height: 56px;
    }
    
    .logo img {
        width: 120px;
    }
    
    .icon-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .btn-seller {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .category-filters {
        padding: 10px 12px;
        top: 56px;
    }
    
    .filter-btn {
        padding: 6px 14px;
        font-size: 11px;
    }
    
    .scroll-arrow {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
    
    .products-grid {
        margin-top: 100px;
        padding: 12px;
        gap: 12px;
        grid-template-columns: 1fr !important;
    }
    
    .product-card {
        border-radius: 12px;
    }
    
    .product-preview {
        height: 200px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .author-badge {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .product-details h3 {
        font-size: 13px;
    }
    
    .product-details p {
        font-size: 11px;
    }
    
    .price {
        font-size: 15px;
    }
    
    .old-price {
        font-size: 11px;
    }
    
    .btn-preview, .btn-details, .btn-add-cart, .btn-download {
        padding: 8px 14px;
        font-size: 11px;
    }
    
    .load-more-container {
        padding: 12px;
    }
    
    .btn-load-more {
        padding: 12px;
        font-size: 13px;
    }
    
    .auth-form {
        padding: 20px;
    }
    
    .auth-form h2 {
        font-size: 20px;
    }
    
    .preview-info h2 {
        font-size: 16px !important;
    }
    
    .preview-thumbnails {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .preview-thumb {
        height: 45px;
    }
}

/* Dark Theme */
body.dark-theme {
    background: #181818;
    color: #f9fafb;
}

body.dark-theme .sidebar {
    background: #212121;
    border-right-color: #2a2a2a;
}

body.dark-theme .sidebar::-webkit-scrollbar-thumb {
    background: #4b5563;
}

body.dark-theme .sidebar::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

body.dark-theme .sidebar::before {
    opacity: 0.25;
}

body.dark-theme .nav-item,
body.dark-theme .footer-link {
    color: #9ca3af;
}

body.dark-theme .nav-item:hover,
body.dark-theme .footer-link:hover {
    background: #374151;
    color: #f9fafb;
}

body.dark-theme .nav-item.active {
    background: #065f46;
    color: #10b981;
}

body.dark-theme .top-header {
    background: #252525;
    border-bottom-color: #2a2a2a;
}

body.dark-theme .icon-btn {
    background: transparent;
    color: #9ca3af;
}

body.dark-theme .icon-btn:hover {
    background: transparent;
}

body.dark-theme .category-filters {
    background: rgba(24, 24, 24, 0.5);
    backdrop-filter: blur(10px);
    border-bottom-color: #2a2a2a;
}

body.dark-theme .filter-btn {
    background: #323232;
    border-color: #1a1a1a;
    color: #f9fafb;
}

body.dark-theme .filter-btn:hover {
    background: #3c3b3b;
    border-color: #10b981;
}

body.dark-theme .filter-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border-color: #10b981;
}

body.dark-theme .products-grid {
    background: #181818;
}

body.dark-theme .product-card {
    background: #252525;
    border-color: #2a2a2a;
}

body.dark-theme .product-card:hover {
    border-color: #2a2a2a;
}

body.dark-theme .product-info {
    background: linear-gradient(to top, rgba(24, 24, 24, 0.98), transparent);
}

body.dark-theme .product-details h3 {
    color: #f9fafb;
}

body.dark-theme .product-details p {
    color: #9ca3af;
}

body.dark-theme .price {
    background: rgba(42, 42, 42, 0.7);
}

body.dark-theme .old-price {
    color: rgba(255,255,255,0.5);
}

body.dark-theme .load-more-container {
    background: #252525;
    border-top-color: #2a2a2a;
}

body.dark-theme .auth-modal {
    background: #2a2a2a;
}

body.dark-theme .auth-form::before {
    opacity: 0.35;
}

body.dark-theme .auth-form h2 {
    color: #f9fafb;
}

body.dark-theme .auth-form input {
    background: rgba(55, 65, 81, 0.3);
    border-color: #4b5563;
    color: #f9fafb;
}

body.dark-theme .auth-form input:focus {
    background: rgba(55, 65, 81, 0.5);
}

body.dark-theme .social-btn {
    background: #374151;
    border-color: #4b5563;
}

body.dark-theme .preview-modal {
    background: #252525;
}

body.dark-theme .preview-modal-header {
    background: #252525;
    border-bottom-color: #374151;
}

body.dark-theme .preview-modal-title h3 {
    color: #f9fafb;
}

body.dark-theme .preview-modal-title span {
    color: #9ca3af;
}

body.dark-theme .preview-description {
    background: #1f2937;
}

body.dark-theme .preview-description p {
    color: #9ca3af;
}

body.dark-theme .close-preview {
    background: #374151;
    color: #9ca3af;
}

body.dark-theme .close-preview:hover {
    background: #4b5563;
    color: #f9fafb;
}

body.dark-theme .preview-left-section::before {
    opacity: 0.08;
}

body.dark-theme .preview-image {
    background: #2a2a2a;
}

body.dark-theme .preview-info {
    background: #2a2a2a;
}

body.dark-theme .preview-header {
    border-bottom-color: #374151;
}

body.dark-theme #previewTitle {
    color: #f9fafb;
}

body.dark-theme .preview-meta-list {
    border-top-color: #374151;
    border-bottom-color: #374151;
}

body.dark-theme .meta-value {
    color: #f9fafb;
}

body.dark-theme .preview-actions {
    background: #2a2a2a;
    border-top-color: #374151;
}

body.dark-theme .btn-preview-action {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

body.dark-theme .btn-preview-action:hover {
    border-color: #10b981;
}

body.dark-theme .btn-preview-action.primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border-color: #10b981;
}

body.dark-theme .gallery-main {
    background: #1f2937;
}

body.dark-theme .gallery-btn {
    background: rgba(31,41,55,0.9);
    color: #f9fafb;
}

body.dark-theme .gallery-btn:hover {
    background: #10b981;
}

body.dark-theme .gallery-thumb:hover,
body.dark-theme .gallery-thumb.active {
    border-color: #10b981;
}



body.dark-theme .detail-card,
body.dark-theme .detail-description,
body.dark-theme .detail-image-main {
    background: #252525;
}

body.dark-theme .detail-card h1,
body.dark-theme .detail-description h2 {
    color: #f9fafb;
}

body.dark-theme .meta-value {
    color: #f9fafb;
}

body.dark-theme .detail-meta {
    border-top-color: #374151;
    border-bottom-color: #374151;
}

body.dark-theme .share-btn,
body.dark-theme .btn-icon {
    background: #374151;
    border-color: #4b5563;
    color: #9ca3af;
}

body.dark-theme .share-btn:hover,
body.dark-theme .btn-icon:hover {
    border-color: #10b981;
    color: #10b981;
}

body.dark-theme .thumbnail {
    background: #374151;
    border-color: #4b5563;
}

body.dark-theme .product-detail {
    background: #181818;
}

/* Checkout Dark Theme */
body.dark-theme .checkout-page {
    background: #181818;
}

body.dark-theme .checkout-card,
body.dark-theme .order-summary {
    background: #252525;
}

body.dark-theme .checkout-card h2,
body.dark-theme .order-summary h3 {
    color: #f9fafb;
}

body.dark-theme .form-group label {
    color: #f9fafb;
}

body.dark-theme .form-group input {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

body.dark-theme .payment-method {
    background: #1f2937;
    border-color: #374151;
}

body.dark-theme .payment-method span {
    color: #f9fafb;
}

body.dark-theme .summary-item {
    border-bottom-color: #374151;
}

body.dark-theme .summary-item-title {
    color: #f9fafb;
}

body.dark-theme .summary-row {
    color: #f9fafb;
}

body.dark-theme .summary-row.total {
    border-top-color: #374151;
}

/* Preview Modal Dark Theme */
body.dark-theme #previewTitle,
body.dark-theme #previewAuthor {
    color: #f9fafb !important;
}

body.dark-theme .preview-header p {
    color: #9ca3af !important;
}

body.dark-theme .author-info h3 {
    color: #f9fafb !important;
}

body.dark-theme .author-info p {
    color: #9ca3af !important;
}
