/* style.css */

:root {
    --bg-color: #050505;
    --text-color: #f5f5f5;
    --accent-color: #2f2f2f;
    --hover-color: #1a1a1a;
    --font-heading: 'Bodoni Moda', serif;
    --font-body: 'Inter', sans-serif;
    --gold-accent: #cfa870;
}

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

html, body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--gold-accent);
}

/* --- NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-links {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cart-icon {
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--gold-accent);
    color: #000;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 2rem;
    overflow: hidden;
    background-color: var(--bg-color);
}

.hero-bg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: url('assets/Cap Tshirt and Jacket.jpg') center/cover no-repeat;
    filter: blur(12px) contrast(1.2);
    opacity: 0.6;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(5,5,5,0.3) 0%, rgba(5,5,5,1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding-top: 5rem;
}

.hero-content h1 {
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 500px;
    margin-bottom: 2rem;
}

.hero-banners {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.promo-tag {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    backdrop-filter: blur(5px);
}

.action-tag {
    background: var(--gold-accent);
    color: #000;
    border: none;
    font-weight: 600;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: #fff;
    color: #000;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.btn:hover {
    background: var(--gold-accent);
    transform: translateY(-3px);
}

.btn-primary {
    background: #fff;
    color: #000;
}

/* --- COLLECTION SECTION --- */
.collection-section {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--gold-accent);
    font-style: italic;
    font-family: var(--font-heading);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.product-card {
    display: flex;
    flex-direction: column;
}

.card-image-box {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: #111;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease, transform 0.8s ease;
}

.hover-img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.card-image-box:hover .main-img {
    opacity: 0 !important;
}

.card-image-box:hover .hover-img {
    opacity: 1 !important;
    z-index: 2;
}

.product-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.price {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-info p.description {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1; /* Absorbs empty space to align dropdowns perfectly */
}

.payment-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pay-badge {
    padding: 0.25rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 3px;
    letter-spacing: 0.03em;
}

.klarna-badge {
    background: #ffb3c7;
    color: #1a1a1a;
}

.clearpay-badge {
    background: #b2fce4;
    color: #1a1a1a;
}

.card-badge {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

.product-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-row {
    width: 100%;
}

.color-select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #000;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    font-size: 0.85rem;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.color-select:focus, .color-select:hover {
    border-color: #fff;
}

.color-select option {
    background: #111;
    color: #fff;
}

.btn-checkout {
    width: 100%;
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: 0.8rem;
    font-size: 0.8rem;
}

.btn-checkout:hover {
    background: #fff;
    color: #000;
}

/* --- MODAL --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

.modal-content {
    background: #111;
    padding: 3rem;
    border: 1px solid rgba(255,255,255,0.1);
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: rgba(255,255,255,0.5);
    transition: color 0.3s;
}

.close-btn:hover {
    color: #fff;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.gateway-btn {
    padding: 1rem;
    border: none;
    font-family: var(--font-body);
    font-weight: 600;
    color: #000;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1rem;
    transition: transform 0.2s;
}

.gateway-btn:hover {
    transform: scale(1.02);
}

.klarna { background: #ffa6c9; }
.clearpay { background: #b1e5d5; }
.card { background: #fff; }

/* --- LOOKBOOK SECTION --- */
.lookbook-section {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.lookbook-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.gallery-category-label {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold-accent);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(207, 168, 112, 0.3);
}

.lookbook-item {
    width: 100%;
    aspect-ratio: 1/1; /* Force square for consistency in gallery */
    height: auto;
    overflow: hidden;
    position: relative;
    background: #111;
}

.lookbook-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Use variables to prevent "spinning" on hover */
    transform: rotate(var(--rotation, 0deg)) scale(var(--base-scale, 1));
    transition: transform 0.6s ease;
}

.lookbook-item:hover img {
    /* Maintain rotation while scaling */
    transform: rotate(var(--rotation, 0deg)) scale(calc(var(--base-scale, 1) * 1.05));
}

/* --- CART DRAWER --- */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: #0a0a0a;
    border-left: 1px solid rgba(255,255,255,0.1);
    z-index: 3000;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
}

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

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2999;
    display: none;
}

.cart-overlay.open {
    display: block;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

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

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 1.5rem;
}

.cart-item img {
    width: 80px;
    height: 100px;
    object-fit: cover;
}

.cart-item-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.cart-item-info p {
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.remove-item {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: underline;
}

.cart-summary {
    padding: 1.5rem;
    background: #111;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.promo-section {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.promo-section p {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.promo-input-group {
    display: flex;
    gap: 0.5rem;
}

#promo-email {
    flex-grow: 1;
    padding: 0.6rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.3s;
}

#promo-email:focus {
    border-color: #fff;
}

#apply-promo-btn {
    padding: 0.6rem 1rem;
    background: #fff;
    color: #000;
    border: none;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

#apply-promo-btn:hover {
    opacity: 0.8;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.total-row {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
}

.checkout-btn {
    width: 100%;
    margin-top: 1rem;
    text-align: center;
}

/* --- FOOTER --- */
footer {
    background: #000;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 5rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

.footer-links h4 {
    margin-bottom: 1.5rem;
}

.footer-links a {
    display: block;
    margin-bottom: 0.8rem;
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.5;
}

/* --- ANIMATIONS --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

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

/* Responsiveness */

/* Hamburger */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(5,5,5,0.97);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        display: none;
        z-index: 999;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .nav-links.mobile-open { display: flex; }
    .hamburger { display: flex; }
    .footer-content { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 3rem; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
    .form-row { flex-direction: column; }
    .modal-content { padding: 1.5rem; max-height: 90vh; overflow-y: auto; }
}

/* Checkout Form */
.form-group {
    margin-bottom: 1rem;
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.6;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input {
    width: 100%;
    padding: 0.7rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #fff;
}

.form-row {
    display: flex;
    gap: 1rem;
}

/* Scroll to Top */
#scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background 0.3s ease;
    z-index: 900;
    backdrop-filter: blur(5px);
}

#scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

#scroll-top:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Add to Cart Flash Animation */
@keyframes cartFlash {
    0%   { transform: scale(1); background: #fff; color: #000; }
    30%  { transform: scale(1.06); background: var(--gold-accent); color: #000; }
    60%  { transform: scale(0.98); }
    100% { transform: scale(1); }
}

.cart-flash {
    animation: cartFlash 0.5s ease forwards;
}

/* Orientation Fixes - Handles sideways photos with variable-based scaling */
.rotate-90 {
    --rotation: 90deg;
    --base-scale: 1.4;
}

.rotate-180 {
    --rotation: 180deg;
    --base-scale: 1.1;
}

/* Base style for all product images to respect orientation variables */
.product-image {
    pointer-events: none;
    transform: rotate(var(--rotation, 0deg)) scale(var(--base-scale, 1));
    transition: opacity 0.5s ease; /* Remove transform from base transition to stop variant spinning */
}

/* Add zoom transition ONLY to hover state */
.card-image-box:hover .product-image {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

/* Ensure main image keeps its rotation during hover-zoom */
.card-image-box:hover .main-img {
    opacity: 0;
    transform: rotate(var(--rotation, 0deg)) scale(calc(var(--base-scale, 1) * 1.1));
}

/* Ensure hover image (model) also has a clean zoom without unintended rotation */
.card-image-box:hover .hover-img {
    opacity: 1;
    transform: rotate(0deg) scale(1.05); /* Force 0deg for model shots unless specified */
}

/* Specific fix for lightbox rotation */
.lightbox.rotate-90 img {
    transform: rotate(90deg) scale(0.9);
    max-width: 80vh !important;
    max-height: 100vw !important;
}

.lightbox.rotate-180 img {
    transform: rotate(180deg) scale(0.9);
}

/* Gallery Hover Enhancement */
.gallery-clickable .lookbook-item {
    cursor: zoom-in;
    position: relative;
}

.gallery-clickable .lookbook-item::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0,0,0,0.6);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.gallery-clickable .lookbook-item:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Premium Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 5000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.open {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Remove rotation in lightbox to let user see clearly */
.lightbox.rotated img {
    transform: none;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 5100;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 110%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.lightbox-nav button {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox-nav button:hover {
    background: #fff;
    color: #000;
}

#lightbox-caption {
    margin-top: 1.5rem;
    color: #fff;
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 100%;
        padding: 0 1rem;
    }
    .lightbox-nav button {
        width: 44px;
        height: 44px;
    }
}

/* Stock Badge Luxury Styling */
.stock-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
}
