/* darkxcode-store/style.css */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark theme (default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #151520;
    --bg-tertiary: #1e1e2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0c0;
    --accent-primary: #00ff88;
    --accent-secondary: #0088ff;
    --accent-danger: #ff4444;
    --border-color: #2a2a3a;
    --shadow-color: rgba(0, 255, 136, 0.1);
    --card-bg: rgba(30, 30, 45, 0.8);
    --overlay-bg: rgba(10, 10, 15, 0.95);
    --gradient-primary: linear-gradient(135deg, #00ff88 0%, #0088ff 100%);
    --gradient-secondary: linear-gradient(135deg, #151520 0%, #1e1e2d 100%);
}

[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #495057;
    --accent-primary: #007bff;
    --accent-secondary: #6f42c1;
    --accent-danger: #dc3545;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.9);
    --overlay-bg: rgba(248, 249, 250, 0.95);
    --gradient-primary: linear-gradient(135deg, #007bff 0%, #6f42c1 100%);
    --gradient-secondary: linear-gradient(135deg, #ffffff 0%, #e9ecef 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto Mono', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Navigation */
.navbar {
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-main {
    height: 40px;
    filter: drop-shadow(0 0 10px var(--accent-primary));
    transition: transform 0.3s ease;
}

.logo-main:hover {
    transform: scale(1.05);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: background 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    left: 0;
    transition: transform 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.theme-icon::before {
    content: '☀️';
    font-size: 1.2rem;
}

[data-theme="dark"] .theme-icon::before {
    content: '🌙';
}

.cart-icon {
    position: relative;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-icon:hover {
    background: var(--accent-primary);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-danger);
    color: white;
    font-size: 0.8rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 300px);
    padding: 2rem 0;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto 2rem;
    padding: 0 20px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links,
.footer-contact {
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer-contact a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--accent-primary);
}

.security-notice {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.security-icon::before {
    content: '🔒';
    margin-right: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-separator {
    margin: 0 1rem;
    color: var(--border-color);
}

.author-link {
    color: var(--accent-primary);
    text-decoration: none;
}

.author-link:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.btn-danger {
    background: var(--accent-danger);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: white;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px var(--shadow-color);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--shadow-color);
}

.form-control:read-only {
    background: var(--bg-tertiary);
    cursor: not-allowed;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.alert-error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    color: #ffc107;
}

.alert-info {
    background: rgba(0, 136, 255, 0.1);
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product-card {
    position: relative;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-primary);
    margin: 0.5rem 0;
}

.product-features {
    list-style: none;
    margin: 1rem 0;
}

.product-features li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.product-features li::before {
    content: '✓';
    color: var(--accent-primary);
    margin-right: 0.5rem;
}

/* Product Detail */
.product-gallery {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.thumbnail-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail.active,
.thumbnail:hover {
    border-color: var(--accent-primary);
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 1rem;
}

/* Filter */
.filter-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.pagination-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Invoice */
.invoice-container {
    max-width: 800px;
    margin: 2rem auto;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
}

.invoice-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    text-align: center;
}

.invoice-body {
    padding: 2rem;
}

.invoice-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.invoice-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.invoice-total {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-primary);
    text-align: right;
    margin-top: 1rem;
}

.qr-container {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: 12px;
}

.qr-code {
    max-width: 300px;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .hamburger.active {
        background: transparent;
    }
    
    .hamburger.active::before {
        transform: rotate(45deg);
        top: 0;
    }
    
    .hamburger.active::after {
        transform: rotate(-45deg);
        bottom: 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .product-gallery {
        grid-template-columns: 1fr;
    }
    
    .thumbnail-list {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .thumbnail {
        flex-shrink: 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Tambahkan di akhir file style.css */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
}

.product-image-container {
    height: 200px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.product-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.product-category,
.product-duration {
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.product-actions .btn {
    flex: 1;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover:not(.active) {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.pagination-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    cursor: default;
}

.pagination-dots {
    padding: 0.5rem;
    color: var(--text-secondary);
}

.error-message {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--accent-danger);
}

.error-message h3 {
    color: var(--accent-danger);
    margin-bottom: 1rem;
}

.error-message p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.no-products {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-products h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
}





/* Tambahkan di style.css */

/* Loading spinner untuk tombol */
.btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-spinner .spinner {
    animation: rotate 2s linear infinite;
    width: 16px;
    height: 16px;
}

.btn-spinner .spinner .path {
    stroke: currentColor;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* View details button hover effect */
.view-details-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.view-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
}

/* Disabled button state */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Product card hover improvements */
.product-card {
    position: relative;
}

.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    pointer-events: none;
}

.product-card:hover::after {
    border-color: var(--accent-primary);
}

/* Smooth transitions */
.product-card,
.filter-section,
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .view-details-btn,
    .add-to-cart {
        min-height: 44px;
        min-width: 44px;
        font-size: 1rem;
    }
    
    .btn-spinner .spinner {
        width: 20px;
        height: 20px;
    }
}