/* Currency Switcher & Cart Styles */

/* Store Page Background - Match store navbar gradient */
body.store-page {
    background: #0f0c09 !important;
}

/* Store Page Spacing - Prevent header overlap */
.store-hero {
    margin-top: 120px !important;
    padding-top: 40px !important;
    padding-bottom: 40px !important;
    background: linear-gradient(180deg, #0f0c09 0%, #1a1512 100%) !important;
    position: relative !important;
    z-index: 101 !important; /* Above the store-nav black fill */
}

.store-nav-section {
    position: sticky !important;
    top: 120px !important; /* Below the header */
    z-index: 100 !important;
    background: linear-gradient(180deg, #0f0c09 0%, #1a1512 100%) !important;
    border-bottom: 2px solid rgba(212, 164, 76, 0.3) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    margin-bottom: 30px;
    margin-top: 15px !important;
    padding: 12px 0 !important;
}

/* Black fill above store nav when sticky */
.store-nav-section::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 0;
    right: 0;
    height: 120px;
    background: #0f0c09;
    z-index: -1;
    pointer-events: none; /* Don't block clicks */
}

.store-categories {
    flex-wrap: wrap !important;
    padding: 2px 0;
    gap: 8px !important;
    position: relative;
    z-index: 1;
}

/* Smaller category buttons */
.store-cat-btn {
    padding: 8px 16px !important;
    font-size: 0.75rem !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    position: relative;
    z-index: 2;
}

.store-cat-btn i {
    font-size: 0.85rem !important;
    pointer-events: none; /* Icon doesn't block button clicks */
}

.store-cat-btn:hover {
    transform: translateY(-2px) !important;
}

.store-cat-btn.active {
    box-shadow: 0 3px 12px rgba(212, 164, 76, 0.4) !important;
}

.store-items-section {
    position: relative;
    z-index: 1;
}

/* Currency Switcher */
.currency-switcher {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.currency-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.currency-label {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.currency-buttons {
    display: flex;
    gap: 10px;
    background: rgba(15, 12, 9, 0.6);
    padding: 5px;
    border-radius: 25px;
    border: 1px solid rgba(212, 164, 76, 0.3);
}

.currency-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.currency-btn:hover {
    color: var(--gold);
    background: rgba(212, 164, 76, 0.1);
}

.currency-btn.active {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--bg-darker);
    box-shadow: 0 4px 15px rgba(212, 164, 76, 0.4);
}

.currency-symbol {
    font-size: 1.1rem;
}

.currency-code {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.exchange-rate-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 8px 16px;
    background: rgba(15, 12, 9, 0.4);
    border-radius: 15px;
    border: 1px solid rgba(212, 164, 76, 0.2);
}

.exchange-rate-info i {
    color: var(--gold);
    font-size: 0.8rem;
}

/* Cart Button in Nav */
#cart-button {
    position: relative !important;
    display: inline-flex !important;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--gold);
    color: var(--bg-darker);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    height: 20px;
    text-align: center;
    display: none;
    box-shadow: 0 2px 8px rgba(212, 164, 76, 0.6);
    line-height: 14px;
    z-index: 1;
    pointer-events: none;
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-modal.active {
    opacity: 1;
    visibility: visible;
}

.cart-modal-content {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    border: 2px solid rgba(212, 164, 76, 0.3);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 164, 76, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cart-modal.active .cart-modal-content {
    transform: scale(1);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid rgba(212, 164, 76, 0.2);
}

.cart-header h2 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.cart-close:hover {
    background: rgba(212, 164, 76, 0.1);
    color: var(--gold);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.cart-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-style: italic;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(15, 12, 9, 0.4);
    border: 1px solid rgba(212, 164, 76, 0.2);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: rgba(212, 164, 76, 0.4);
    background: rgba(15, 12, 9, 0.6);
}

.cart-item-info h4 {
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    margin: 0 0 4px 0;
}

.cart-item-price {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-quantity {
    width: 60px;
    padding: 8px;
    background: rgba(15, 12, 9, 0.6);
    border: 1px solid rgba(212, 164, 76, 0.3);
    border-radius: 8px;
    color: var(--text-light);
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    text-align: center;
}

.cart-item-remove {
    background: rgba(139, 0, 0, 0.3);
    border: 1px solid rgba(220, 20, 60, 0.4);
    color: #ff6b6b;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.cart-item-remove:hover {
    background: rgba(220, 20, 60, 0.4);
    border-color: #ff6b6b;
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid rgba(212, 164, 76, 0.2);
    background: rgba(15, 12, 9, 0.6);
}

.cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: var(--gold);
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border: none;
    border-radius: 12px;
    color: var(--bg-darker);
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 164, 76, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    touch-action: manipulation;
}

.checkout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 164, 76, 0.6);
}

.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cart Notification */
.cart-notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--bg-darker);
    padding: 16px 32px;
    border-radius: 25px;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 8px 24px rgba(212, 164, 76, 0.6);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-notification.show {
    bottom: 30px;
}

.cart-notification i {
    font-size: 1.1rem;
}

/* Checkout Messages */
.checkout-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.checkout-message-content {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    border: 2px solid rgba(212, 164, 76, 0.4);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 60px rgba(212, 164, 76, 0.3);
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkout-message-content i {
    font-size: 5rem;
    margin-bottom: 20px;
}

.checkout-message.success i {
    color: #4caf50;
    text-shadow: 0 0 30px rgba(76, 175, 80, 0.6);
}

.checkout-message.canceled i {
    color: #f44336;
    text-shadow: 0 0 30px rgba(244, 67, 54, 0.6);
}

.checkout-message-content h2 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 2rem;
    margin: 0 0 16px 0;
}

.checkout-message-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

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

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Product Detail Popup Modal */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.product-modal.active {
    opacity: 1;
    visibility: visible;
}

.product-modal-content {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    border: 2px solid rgba(212, 164, 76, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 164, 76, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.product-modal.active .product-modal-content {
    transform: scale(1);
}

.product-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(212, 164, 76, 0.2);
    background: rgba(15, 12, 9, 0.5);
}

.product-modal-header h2 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1.3rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.product-modal-close:hover {
    background: rgba(212, 164, 76, 0.1);
    color: var(--gold);
}

.product-modal-body {
    padding: 24px;
    text-align: center;
}

.product-modal-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-modal-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-modal-image i {
    font-size: 4rem;
    color: var(--gold);
}

.product-modal-name {
    font-family: 'Cinzel', serif;
    color: var(--text-light);
    font-size: 1.4rem;
    margin: 0 0 8px 0;
}

.product-modal-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.product-modal-features {
    text-align: left;
    margin: 0 0 20px 0;
    padding: 16px;
    background: rgba(15, 12, 9, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(212, 164, 76, 0.15);
}

.product-modal-features ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.product-modal-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.product-modal-features li i {
    color: var(--gold);
    font-size: 0.85rem;
    width: 18px;
}

.product-modal-price {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--gold);
    margin: 0 0 24px 0;
}

.product-modal-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-family: 'Lato', sans-serif;
}

.product-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-modal-btn.primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--bg-darker);
    box-shadow: 0 4px 15px rgba(212, 164, 76, 0.4);
}

.product-modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 164, 76, 0.6);
}

.product-modal-btn.secondary {
    background: rgba(212, 164, 76, 0.15);
    color: var(--gold);
    border: 1px solid rgba(212, 164, 76, 0.3);
}

.product-modal-btn.secondary:hover {
    background: rgba(212, 164, 76, 0.25);
    border-color: var(--gold);
}

.product-modal-btn i {
    font-size: 1rem;
}

/* Laptop Responsive */
@media (max-width: 1400px) {
    .store-hero {
        margin-top: 80px !important;
        padding-top: 24px !important;
        padding-bottom: 24px !important;
    }

    .store-logo {
        height: 60px !important;
    }

    .store-title {
        font-size: 1.8rem !important;
        margin-bottom: 8px !important;
    }

    .store-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 16px !important;
    }

    .store-notice {
        padding: 10px 16px !important;
        font-size: 0.8rem !important;
    }

    .store-nav-section {
        top: 80px !important;
        padding: 8px 0 !important;
        margin-top: 8px !important;
        margin-bottom: 20px !important;
    }

    .store-nav-section::before {
        top: -80px;
        height: 80px;
    }

    .store-categories {
        gap: 5px !important;
    }

    .store-cat-btn {
        padding: 5px 10px !important;
        font-size: 0.65rem !important;
    }

    .store-cat-btn i {
        font-size: 0.7rem !important;
    }

    .store-items-section {
        padding: 40px 0 60px !important;
    }

    .store-category {
        margin-bottom: 40px !important;
    }
}

@media (max-width: 1024px) {
    .store-hero {
        margin-top: 70px !important;
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .store-logo {
        height: 50px !important;
    }

    .store-title {
        font-size: 1.5rem !important;
    }

    .store-subtitle {
        font-size: 0.85rem !important;
    }

    .store-nav-section {
        top: 70px !important;
        padding: 6px 0 !important;
    }

    .store-nav-section::before {
        top: -70px;
        height: 70px;
    }

    .store-cat-btn {
        padding: 4px 8px !important;
        font-size: 0.6rem !important;
    }

    .store-cat-btn span {
        display: none !important;
    }

    .store-items-section {
        padding: 30px 0 50px !important;
    }

    .store-category {
        margin-bottom: 30px !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Adjust store spacing for mobile */
    .store-hero {
        margin-top: 100px !important;
        padding-top: 30px !important;
        padding-bottom: 20px !important;
        background: linear-gradient(180deg, #0f0c09 0%, #1a1512 100%) !important;
    }

    .store-hero::before {
        top: -100px !important;
        height: 100px !important;
    }

    .store-nav-section {
        top: 100px !important; /* Mobile - below header */
        padding: 10px 0 !important;
        position: sticky !important;
        margin-top: 10px !important;
    }

    .store-categories {
        gap: 6px !important;
    }

    .store-cat-btn {
        font-size: 0.7rem !important;
        padding: 6px 10px !important;
    }

    .store-cat-btn i {
        font-size: 0.75rem !important;
    }

    .currency-info {
        flex-direction: column;
        gap: 10px;
    }

    .currency-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .cart-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .cart-header {
        padding: 20px;
    }

    .cart-header h2 {
        font-size: 1.3rem;
    }

    .cart-body {
        padding: 16px;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }

    .checkout-message-content {
        padding: 40px 24px;
        margin: 20px;
    }

    .checkout-message-content i {
        font-size: 3.5rem;
    }

    .checkout-message-content h2 {
        font-size: 1.5rem;
    }

    .checkout-message-content p {
        font-size: 1rem;
    }

    /* Product Modal Mobile */
    .product-modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .product-modal-header {
        padding: 16px 20px;
    }

    .product-modal-header h2 {
        font-size: 1.1rem;
    }

    .product-modal-body {
        padding: 20px;
    }

    .product-modal-image {
        width: 100px;
        height: 100px;
    }

    .product-modal-name {
        font-size: 1.2rem;
    }

    .product-modal-price {
        font-size: 1.5rem;
    }

    .product-modal-btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
}
