/* CSS Variables for unifying the theme */
:root {
    --deep-red: #7A1A1A;
    /* Gritty Deep Red */
    --vibrant-red: #A31D1D;
    /* Hover states */
    --earthy-brown: #3E2723;
    /* Earthy Brown */
    --light-brown: #5D4037;
    --stark-white: #FFFFFF;
    --off-white: #F5F5F5;
    --dark-bg: #111111;
    --text-dark: #222222;
    --text-light: #EEEEEE;

    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--stark-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

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

/* Layout Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    padding-bottom: 2rem;
}

.section-header h2 {
    font-size: 2.8rem;
    color: var(--earthy-brown);
}

.divider {
    width: 60px;
    height: 4px;
    background-color: var(--deep-red);
    margin: 1.5rem auto;
}

.divider-light {
    background-color: var(--stark-white);
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.btn-primary {
    background-color: var(--deep-red);
    color: var(--stark-white);
}

.btn-primary:hover {
    background-color: var(--vibrant-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(122, 26, 26, 0.4);
}

/* Header & Sticky Nav */
.header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 0;
    position: relative;
}

.logo {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--earthy-brown);
    letter-spacing: 4px;
    pointer-events: none;
}

.logo-img {
    pointer-events: auto;
    max-height: 55px;
    /* Increased from 45px to make it larger */
    width: auto;
}

.nav-list {
    display: flex;
    gap: 3rem;
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    color: var(--earthy-brown);
    position: relative;
    padding-bottom: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--deep-red);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--earthy-brown);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    /* Reverted to fill height naturally */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* Ensure video doesn't break boundaries */
}

/* Background video styling */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(62, 39, 35, 0.4);
    /* Dark earthy overlay to make text pop */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--stark-white);
    padding: 2rem;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 5.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.6);
    line-height: 1.1;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #f1f1f1;
}

/* Shop Section / Featured Product */
.shop {
    background-color: var(--stark-white);
}

.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.product-container:last-of-type {
    padding-bottom: 6rem;
}

.product-image-wrapper {
    background-color: var(--stark-white);
    border-radius: 4px;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
    /* Remove gap so images snap precisely to 100% width */
    position: relative;
    /* transition: transform 0.4s ease; removed to not conflict with scrolling */
}

/* Hide scrollbar for a cleaner look */
.product-image-wrapper::-webkit-scrollbar {
    display: none;
}

.product-image-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.product-image-wrapper:hover {
    transform: scale(1.02);
}

.product-image {
    max-height: 550px;
    min-width: 100%;
    /* Force each image to take full width of container */
    object-fit: contain;
    scroll-snap-align: start;
    /* Snap securely to each image */
    z-index: 1;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.15));
}

.product-title {
    font-size: 3rem;
    color: var(--earthy-brown);
    margin-bottom: 0.5rem;
}

.product-price {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--deep-red);
    margin-bottom: 2rem;
    font-weight: 500;
}

.product-description {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.btn-stripe {
    background: var(--deep-red);
    color: var(--stark-white);
    font-weight: 600;
    width: 100%;
    max-width: 320px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-stripe::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.6s;
}

.btn-stripe:hover {
    background: var(--vibrant-red);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(122, 26, 26, 0.3);
}

.btn-stripe:hover::before {
    left: 100%;
}

/* Custom Size Selector Styles */
.size-selector-container {
    margin: 1.5rem 0;
    text-align: left;
}

.size-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--earthy-brown);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.size-dropdown {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: var(--stark-white);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--earthy-brown);
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    /* Remove default browser styling */
    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='%233e2723' 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: 1em;
    transition: border-color 0.3s ease;
}

.size-dropdown:focus {
    outline: none;
    border-color: var(--earthy-brown);
}

/* Custom Patchwork Section */
.custom-patchwork {
    background-color: var(--dark-bg);
    color: var(--stark-white);
    position: relative;
}

.custom-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-content {
    max-width: 800px;
    text-align: center;
}

.custom-content h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--stark-white);
}

.custom-content p {
    color: #b3b3b3;
    margin-bottom: 3rem;
    font-size: 1.15rem;
    line-height: 1.8;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--stark-white);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--deep-red);
    background-color: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.contact-form .btn {
    align-self: flex-start;
}

/* About Section */
.about {
    background-color: var(--off-white);
    position: relative;
    overflow: hidden;
}

.about::after {
    content: "JUGG";
    position: absolute;
    bottom: -50px;
    right: -20px;
    font-family: var(--font-heading);
    font-size: 15rem;
    color: rgba(0, 0, 0, 0.02);
    z-index: 0;
    font-weight: 700;
}

.about-container {
    text-align: center;
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.about-text h2 {
    font-size: 2.8rem;
    color: var(--earthy-brown);
}

.owner-name {
    font-size: 2rem;
    color: var(--deep-red);
    margin-bottom: 1.5rem;
}

.owner-bio {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--earthy-brown);
}

/* Footer */
.footer {
    background-color: var(--stark-white);
    /* White footer */
    color: var(--earthy-brown);
    /* Dark text for contrast */
    padding-top: 5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    /* subtle separation */
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 12%;
    padding-top: 0;
    padding-bottom: 4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-brand h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--earthy-brown);
    letter-spacing: 3px;
}

.footer-logo-img {
    max-height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--earthy-brown);
    font-size: 0.95rem;
    font-weight: 600;
}

.footer h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--deep-red);
}

.footer-contact p,
.social-link {
    margin-bottom: 1rem;
    display: block;
    color: var(--earthy-brown);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.social-link svg {
    color: var(--earthy-brown);
    transition: color 0.3s ease;
}

.social-link:hover svg {
    color: var(--vibrant-red);
}

.footer-social {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.social-icons {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
    color: rgba(62, 39, 35, 0.5);
    /* subtle brand color for copyright */
}

/* Responsive Design */
@media (max-width: 992px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .product-image-wrapper {
        order: -1;
    }

    .hero-content h1 {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {

    /* Ensure hero video scales properly to fit entire frame without cropping on phone */
    .hero {
        min-height: auto;
        /* Remove 100vh restriction */
        height: auto;
        padding-top: 56.25%;
        /* 16:9 Aspect Ratio hack (or adjust if video is a different aspect ratio) */
    }

    .hero-video {
        width: 100%;
        height: 100%;
        top: 50%;
        transform: translate(-50%, -50%);
        /* Revert back to true horizontal and vertical centering */
        object-fit: contain;
        /* Don't crop, show full video */
    }

    .hero-overlay {
        top: 0;
        height: 100%;
    }

    .hero-content {
        position: absolute;
        /* Re-center absolute content over padding-based container */
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: var(--stark-white);
        width: 100%;
        text-align: center;
        transition: 0.3s ease;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 2rem;
    }

    .hero {
        background-attachment: scroll;
        /* Disable parallax on mobile for performance */
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .contact-form .btn {
        align-self: flex-start;
        width: 100%;
    }

    /* Reset image wrapper on mobile if needed, though 100% min-width usually works beautifully everywhere */
    .product-image-wrapper {
        flex-direction: row;
        /* keep horizontal scroll on mobile */
    }

    .product-image {
        max-height: 400px;
    }

    .section-header h2 {
        font-size: 2.3rem;
    }

    .container {
        padding: 4rem 0;
    }

    .footer-container {
        text-align: center;
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .footer-social {
        align-items: center;
        text-align: center;
    }

    .social-icons {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .product-title {
        font-size: 2.2rem;
    }

    .custom-content h2,
    .about-text h2 {
        font-size: 2.2rem;
    }
}