:root {
    /* Colors - matching NSK Home */
    --bg-dark: #0f1115;
    --bg-card: #181b21;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --accent-primary: #c62828;
    --accent-secondary: #0097a7;
    --metallic: #e0e0e0;
    --border-color: #2a2e35;

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;

    /* Spacing & Effects */
    --transition: 0.3s ease;
    --shadow-subtle: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 4px 15px rgba(198, 40, 40, 0.3);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.2;
}

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

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

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #a01f1f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:disabled {
    background-color: #333;
    color: #888;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Header */
header {
    background: rgba(15, 17, 21, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-icon {
    position: relative;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
    padding: 10px;
}

.cart-icon:hover {
    color: var(--accent-primary);
}

#cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
}

/* Hero Section */
.hero-shop {
    text-align: center;
    padding: 4rem 0 2rem;
}

.hero-tag {
    color: var(--accent-primary);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
    font-size: 0.85rem;
}

.hero-shop h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #fff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-shop p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0 5rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.product-img {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #222, #111);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Added to ensure no image overflow */
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

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

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.product-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-primary);
}

/* Cart Sidebar */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 201;
    display: flex;
    flex-direction: column;
    transition: 0.4s cubic-bezier(0.8, 0, 0.2, 1);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart, .close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-cart:hover, .close-modal:hover {
    color: var(--accent-primary);
    transform: rotate(90deg);
}

.cart-items {
    padding: 2rem;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.cart-item-info h4 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.cart-item-price {
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.qty-btn {
    background: #333;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--accent-primary);
}

.remove-item {
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    border: none;
    background: none;
    transition: var(--transition);
}

.remove-item:hover {
    color: var(--accent-primary);
}

.cart-footer {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Modals */
.checkout-modal, .receipt-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 1rem;
}

.checkout-modal.active, .receipt-modal.active {
    opacity: 1;
    visibility: visible;
}

.checkout-content, .receipt-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 500px;
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    position: relative;
    transform: translateY(30px);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.checkout-modal.active .checkout-content, 
.receipt-modal.active .receipt-content {
    transform: translateY(0);
}

.checkout-content h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-main);
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.2);
}

/* Turnstile container */
.cf-turnstile {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    min-height: 65px;
}

/* Receipt Styling */
.receipt-content {
    text-align: center;
}

.receipt-icon {
    font-size: 4rem;
    color: #00C851;
    margin-bottom: 1rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.receipt-details {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    text-align: left;
    border: 1px solid var(--border-color);
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.receipt-row span:first-child {
    color: var(--text-secondary);
}

.receipt-row span:last-child {
    font-weight: 500;
}

.receipt-row:last-child {
    margin-bottom: 0;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.receipt-row:last-child span:last-child {
    color: var(--accent-primary);
}

/* Footer */
footer {
    background: #000;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-shop h1 {
        font-size: 2.5rem;
    }
    
    .checkout-content, .receipt-content {
        padding: 1.5rem;
    }
}
