/* VARIABLES */
:root {
    --rose-primary: #b76e79;
    --rose-dark: #8c4a53;
    --rose-light: #fff0f5;
    --gold: #d4af37;
    --text-main: #4a4a4a;
    --rose-gold-gradient: linear-gradient(135deg, #d4af37 0%, #b76e79 50%, #e6be8a 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background: #fdfdfd;
    color: var(--text-main);
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
}

/* FIX: Section Title (Golden & Large) */
.section-title {
    font-size: 3rem;
    /* Large text */
    text-align: center;
    margin-bottom: 2rem;
    background: var(--rose-gold-gradient);
    /* Golden/Rose Gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    padding-top: 50px;
}

/* FIX: Header Logo Styling */
.main-header {
    position: absolute;
    /* Keep it over the slider */
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 50;
    display: flex;
    justify-content: center;
}

.brand-logo {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.85);
    /* Slightly more opaque */
    display: flex;
    gap: 20px;
    padding: 10px 40px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    /* Added shadow for better visibility */
}

.brand-logo img {
    height: 60px;
    /* Ensure size control */
    object-fit: contain;
}

.brand-logo span {
    background: var(--rose-gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* FIX: Sticky Branding Styling */
#sticky-branding {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #fff0f5;
    opacity: 0;
    /* Hidden by default */
    transform: translateY(-20px);
    pointer-events: none;
    transition: all 0.4s ease;
}

#sticky-branding.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#sticky-branding img {
    height: 35px;
    margin-right: 10px;
}

#sticky-branding span {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-weight: 700;
    color: #b76e79;
    font-size: 1rem;
}

/* NAVIGATION (Keep as is) */
.swatch-nav {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding-left: 20px;
    gap: 10px;
}

.swatch-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 60px;
    height: 50px;
    background: #fff0f5;
    color: var(--rose-primary);
    text-decoration: none;
    border-radius: 10px 0 0 10px;
    box-shadow: -5px 5px 10px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    margin-left: auto;
}

.swatch-nav:hover .swatch-item {
    width: 170px;
    background: white;
}

.swatch-item .icon {
    width: 50px;
    text-align: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.swatch-item .label {
    white-space: nowrap;
    font-family: 'Playfair Display';
    font-weight: bold;
    opacity: 0;
    transition: 0.3s;
}

.swatch-nav:hover .label {
    opacity: 1;
}

.swatch-item:hover,
.swatch-item.active {
    background: var(--rose-light) !important;
    transform: translateX(-5px);
}

.cart-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--gold);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* SHARED / OTHER */
.parallax-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.soft-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
    transition: transform 0.1s linear;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: #ffe4e1;
    top: -50px;
    left: -50px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #f0fff0;
    bottom: 10%;
    right: -100px;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: #e6e6fa;
    top: 40%;
    left: 30%;
    opacity: 0.2;
}

.yarn-trail {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--rose-primary);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--rose-primary);
    mix-blend-mode: multiply;
    z-index: 9998;
}

.flying-yarn {
    position: fixed;
    width: 30px;
    height: 30px;
    background: var(--rose-primary);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

#preloader {
    position: fixed;
    inset: 0;
    background: #fff0f5;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s ease-in-out;
}

body.loaded #preloader {
    transform: translateY(-100%);
}

.loader-content {
    position: relative;
    width: 300px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.yarn-ball-loader {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #d4af37, #b76e79);
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(183, 110, 121, 0.4);
    animation: rollRight 1s ease-in-out forwards;
}

.yarn-lines {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.2) 5px, rgba(255, 255, 255, 0.2) 7px);
    animation: spinBall 1s ease-in-out forwards;
}

.yarn-thread {
    position: absolute;
    top: 23px;
    left: 25px;
    height: 4px;
    background: #b76e79;
    width: 0;
    border-radius: 2px;
    animation: unspool 1s ease-in-out forwards;
}

.loading-text {
    margin-top: 60px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-size: 1.2rem;
    background: var(--rose-gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    letter-spacing: 2px;
    animation: fadeInText 1s ease-in-out forwards;
    display: flex;
    align-items: center;
    width: max-content;
    font-weight: bold;
    gap: 10px;
}

@keyframes rollRight {
    0% {
        left: 0;
    }

    100% {
        left: 250px;
    }
}

@keyframes spinBall {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(720deg);
    }
}

@keyframes unspool {
    0% {
        width: 0;
    }

    100% {
        width: 250px;
    }
}

@keyframes fadeInText {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-footer {
    text-align: center;
    margin-top: 80px;
    color: #999;
    font-size: 0.9rem;
    padding: 20px;
}