/* =========================================
   Try Jesus Shop - Design System
   ========================================= */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    /* Colors */
    --gold: #d4af37;
    --gold-dark: #b8962e;
    --gold-light: #f4e4c1;
    --gold-glow: rgba(212, 175, 55, 0.25);
    --navy: #1a1a2e;
    --navy-light: #16213e;
    --navy-medium: #0f3460;
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray: #6c757d;
    --gray-dark: #495057;
    --text: #2d3436;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);
    --shadow-gold: 0 8px 24px rgba(212, 175, 55, 0.3);
    
    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.7;
    background: var(--white);
}

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

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

*:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--navy);
    box-shadow: var(--shadow-md), 0 4px 16px rgba(212, 175, 55, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 8px 24px rgba(212, 175, 55, 0.35);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
}

.btn-secondary:hover {
    background: var(--gold);
    color: var(--navy);
    transform: translateY(-2px);
}

/* =========================================
   Navbar
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    color: var(--white);
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    font-size: 1.35rem;
    transition: var(--transition-fast);
}

.logo:hover {
    opacity: 0.9;
}

.logo-img {
    width: 44px;
    height: 44px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold);
}

.nav-cart {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
}

.nav-cart:hover {
    color: var(--gold);
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--navy);
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--white);
    transition: var(--transition-fast);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    min-height: 60vh;
    background: 
        linear-gradient(135deg, rgba(26, 26, 46, 0.92) 0%, rgba(15, 52, 96, 0.88) 100%),
        url('/assets/main.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 10rem 2rem 4rem;
    position: relative;
}

.hero-content {
    max-width: 750px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   Shop Section
   ========================================= */
.shop-section {
    padding: 5rem 0 6rem;
    background: var(--gray-light);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 3rem;
    color: var(--navy);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-light);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message,
.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
    font-size: 1.1rem;
}

/* =========================================
   Product Card
   ========================================= */
.product-card {
    display: block;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.product-image-wrapper {
    position: relative;
    padding-top: 100%;
    background: var(--gray-light);
    overflow: hidden;
}

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

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

.product-price {
    font-size: 1.25rem;
    color: var(--gold-dark);
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-options {
    margin-bottom: 1rem;
}

.product-options label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--gray-dark);
}

.product-options select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition-fast);
}

.product-options select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.add-to-cart-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--navy);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* =========================================
   Cart Drawer
   ========================================= */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

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

.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    max-width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 1002;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
}

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

.cart-header {
    padding: 1.75rem 2rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.35rem;
    color: var(--navy);
}

.close-cart {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition-fast);
    line-height: 1;
}

.close-cart:hover {
    color: var(--navy);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
    color: var(--navy);
}

.cart-item-details .variant {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.cart-item-details .item-price {
    font-weight: 700;
    color: var(--gold-dark);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #e9ecef;
    background: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    font-weight: 600;
}

.qty-btn:hover {
    background: var(--gray-light);
    border-color: var(--gray);
}

.remove-item {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 0.85rem;
    cursor: pointer;
    margin-left: auto;
}

.remove-item:hover {
    color: #a71d2a;
}

.cart-footer {
    padding: 2rem;
    border-top: 1px solid #eee;
    background: var(--gray-light);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--navy);
}

.checkout-btn {
    width: 100%;
    padding: 1.125rem;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.checkout-btn:hover {
    background: var(--navy-light);
    transform: translateY(-2px);
}

.checkout-btn:disabled {
    background: var(--gray);
    cursor: not-allowed;
    transform: none;
}

.empty-cart {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--gray);
}

/* =========================================
   Product Page
   ========================================= */
.product-page {
    padding: 8rem 0 4rem;
    background: var(--white);
    min-height: 100vh;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    background: var(--gray-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.thumbnail {
    background: var(--gray-light);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    transition: var(--transition-fast);
}

.thumbnail:hover {
    border-color: var(--gray);
}

.thumbnail.active {
    border-color: var(--gold);
}

.thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.product-details {
    padding-top: 1rem;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--gold-dark);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.product-details h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.product-details .product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-dark);
    margin-bottom: 2rem;
}

.product-option {
    margin-bottom: 1.5rem;
}

.product-option label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 0.75rem;
}

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.option-btn {
    padding: 0.75rem 1.25rem;
    border: 2px solid #e9ecef;
    background: var(--white);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.option-btn:hover {
    border-color: var(--gray);
}

.option-btn.active {
    border-color: var(--gold);
    background: var(--gold-light);
    color: var(--navy);
}

.add-to-cart-btn.large {
    margin: 2rem 0;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
}

.product-description {
    padding-top: 2rem;
    border-top: 1px solid #eee;
    color: var(--gray-dark);
    line-height: 1.8;
}

.product-description p {
    margin-bottom: 1rem;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background: var(--navy);
    color: var(--white);
    padding: 5rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 1.25rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-col h4 {
    color: var(--gold);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
}

.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.85rem;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.footer-col a:hover {
    color: var(--gold);
    transform: translateX(4px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* =========================================
   Success Page
   ========================================= */
.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    background: var(--gray-light);
}

.success-content {
    max-width: 520px;
    background: var(--white);
    padding: 4rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.success-icon {
    color: #28a745;
    margin-bottom: 1.5rem;
}

.success-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.25rem;
    margin-bottom: 1rem;
    color: var(--navy);
}

.success-message {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.success-detail {
    color: var(--gray);
    margin-bottom: 2rem;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================
   404 Page
   ========================================= */
.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: var(--gray-light);
}

.error-page h1 {
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.error-page p {
    color: var(--gray);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* =========================================
   Notification
   ========================================= */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--navy);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    z-index: 2000;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-brand {
        max-width: none;
        text-align: center;
    }
    
    .footer-logo {
        margin: 0 auto 1.25rem;
    }
}

@media (max-width: 992px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-gallery {
        position: static;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--navy);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-smooth);
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .hero {
        min-height: 50vh;
        padding: 8rem 2rem 3rem;
    }
    
    .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.5rem;
    }
    
    .cart-drawer {
        width: 100%;
        right: -100%;
    }
    
    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .success-content {
        padding: 2.5rem 1.5rem;
    }
    
    .product-page {
        padding: 6rem 0 3rem;
    }
    
    .thumbnail-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .shop-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-nav {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .success-actions .btn {
        width: 100%;
    }
}
