@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ═══════════════════════════════════════
   GLOBALS — Chethi Batik 2026
═══════════════════════════════════════ */

:root {
    /* Main Backgrounds (Light Theme) */
    --bg: #FAFAFA;
    --bg-2: #F0F0F0;
    --bg-3: #E5E5E5;
    --bg-card: #FFFFFF;

    /* Dark Backgrounds (For Header/Footer/Admin) */
    --bg-dark: #080808;
    --bg-dark-2: #0f0f0f;
    --bg-dark-3: #141414;
    --bg-dark-card: #111111;

    /* Brand */
    --red: #D32F2F;
    --red-dark: #8e0000;
    --red-bright: #FF3333;
    --red-glow: rgba(211, 47, 47, 0.28);

    /* Royal Gold Palette */
    --gold: #D4AF37;
    --gold-dark: #C5A021;
    --gold-light: #F1E5AC;
    --gold-glow: rgba(212, 175, 55, 0.35);

    /* Text */
    --white: #FFFFFF;
    --off-white: #F8F8F8;
    --gray: #888888;
    --gray-dark: #3a3a3a;

    /* Primary Text for Light Theme */
    --text-main: #111111;
    --text-muted: #555555;

    /* Structure */
    --border: rgba(0, 0, 0, 0.08);
    /* Primary border for light theme */
    --border-light: rgba(255, 255, 255, 0.07);
    /* For dark sections */
    --border-red: rgba(211, 47, 47, 0.3);
    --border-gold: rgba(212, 175, 55, 0.4);

    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --container: 1320px;
    --pad: clamp(1.5rem, 5vw, 4rem);

    /* Easing */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Shadows */
    --shadow-red: 0 0 40px rgba(211, 47, 47, 0.4);
    --shadow-gold: 0 10px 40px rgba(212, 175, 55, 0.25);
    --shadow-dark: 0 20px 60px rgba(0, 0, 0, 0.8);
    --shadow-light: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* ─── Batik Patterns ─── */
.bg-batik-red {
    background-color: var(--red-dark);
    background-image: 
        linear-gradient(rgba(142, 0, 0, 0.85), rgba(142, 0, 0, 0.85)),
        url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M60 10 L70 35 L95 45 L70 55 L60 80 L50 55 L25 45 L50 35 Z M10 60 L20 75 L45 85 L20 95 L10 120 L0 95 L-25 85 L0 75 Z M110 60 L120 75 L145 85 L120 95 L110 120 L100 95 L75 85 L100 75 Z' stroke='rgba(255,255,255,0.12)' stroke-width='1.5' fill='none'/%3E%3Ccircle cx='60' cy='45' r='3' fill='rgba(255,255,255,0.08)'/%3E%3Ccircle cx='10' cy='85' r='3' fill='rgba(255,255,255,0.08)'/%3E%3Ccircle cx='110' cy='85' r='3' fill='rgba(255,255,255,0.08)'/%3E%3C/svg%3E");
    background-size: cover, 180px 180px;
}

.bg-batik-white {
    background-color: var(--white);
    background-image: 
        url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M60 10 L70 35 L95 45 L70 55 L60 80 L50 55 L25 45 L50 35 Z M10 60 L20 75 L45 85 L20 95 L10 120 L0 95 L-25 85 L0 75 Z M110 60 L120 75 L145 85 L120 95 L110 120 L100 95 L75 85 L100 75 Z' stroke='rgba(211,47,47,0.08)' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-size: 180px 180px;
}

/* ─── Reset ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

img,
video {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

ul,
ol {
    list-style: none;
}

input,
textarea {
    font-family: inherit;
}

/* ─── Base ─── */
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

@media (max-width: 768px) {
    body {
        cursor: auto;
    }
}

/* ─── Noise Texture Overlay ─── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.028;
    pointer-events: none;
    z-index: 9998;
}

/* ─── Scroll Progress Bar ─── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--red-dark), var(--red-bright));
    width: 0%;
    z-index: 10000;
    box-shadow: 0 0 8px var(--red-glow);
    transition: width 0.08s linear;
    pointer-events: none;
}

/* ─── Custom Cursor ─── */
.cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--red);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    transition: width 0.25s var(--spring), height 0.25s var(--spring), background 0.25s, opacity 0.25s;
    box-shadow: 0 0 12px var(--red-glow);
}

.cursor.is-hovering {
    width: 4px;
    height: 4px;
}

.cursor.is-hidden {
    opacity: 0;
}

.cursor-ring {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(211, 47, 47, 0.55);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--spring), height 0.4s var(--spring), border-color 0.3s, background 0.3s, opacity 0.3s;
}

.cursor-ring.is-hovering {
    width: 64px;
    height: 64px;
    border-color: var(--red);
    background: rgba(211, 47, 47, 0.06);
}

.cursor-ring.is-hidden {
    opacity: 0;
}

@media (max-width: 768px) {

    .cursor,
    .cursor-ring {
        display: none;
    }
}

/* ─── Preloader ─── */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: opacity 0.9s var(--ease), visibility 0.9s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Logo wrap — pulse glow ring */
.preloader-logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-logo-wrap::before {
    content: '';
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    border: 1.5px solid rgba(211, 47, 47, 0.45);
    animation: plRingPulse 1.8s ease-in-out infinite;
}

.preloader-logo-wrap::after {
    content: '';
    position: absolute;
    inset: -36px;
    border-radius: 50%;
    border: 1px solid rgba(211, 47, 47, 0.2);
    animation: plRingPulse 1.8s ease-in-out 0.3s infinite;
}

.preloader-logo-img {
    height: 100px;
    width: auto;
    animation: plLogoGlow 2s ease-in-out infinite, fadeUp 0.6s var(--ease) forwards;
    filter: drop-shadow(0 0 0px rgba(211, 47, 47, 0));
}

@keyframes plLogoGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 6px rgba(211, 47, 47, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 22px rgba(211, 47, 47, 0.75));
    }
}

@keyframes plRingPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.2;
    }
}

.preloader-brand {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.45em;
    color: var(--white);
    text-transform: uppercase;
    opacity: 0;
    animation: fadeUp 0.6s var(--ease) 0.8s forwards;
}

.preloader-dots {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 0.4s ease 1s forwards;
}

.preloader-dots span {
    width: 5px;
    height: 5px;
    background: var(--red);
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.preloader-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.preloader-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* ─── Container ─── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--pad);
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.2rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    border-radius: 2px;
    cursor: none;
    transition: all 0.35s var(--ease);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(-110%);
    transition: transform 0.45s var(--ease);
}

.btn:hover::after {
    transform: translateX(0);
}

.btn-primary {
    background: var(--red);
    color: var(--white);
    box-shadow: 0 4px 24px var(--red-glow);
}

.btn-primary:hover {
    background: var(--red-dark);
    box-shadow: var(--shadow-red);
    transform: translateY(-3px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-3);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    color: var(--red);
    border: 1px solid var(--red);
}

.btn-outline:hover {
    background: var(--red);
    color: var(--white);
    transform: translateY(-3px);
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.72rem;
}

/* Internal product card buttons — Force consistency */
.product-card .btn-whatsapp.btn-sm,
.btn-add-cart-mini,
.btn-buy-now-mini {
    padding: 0.6rem 0.6rem !important;
    height: 38px !important; /* Fixed height for absolute alignment */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    line-height: 1;
}

.btn i {
    font-size: 0.85em;
    transition: transform 0.3s var(--ease);
}

.btn:hover i {
    transform: translateX(4px);
}

/* ─── Section Helpers ─── */
.section-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 1.2rem;
    position: relative;
    padding-left: 2rem;
}

.section-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.3rem;
    height: 1px;
    background: var(--red);
}

.section-header .section-tag {
    padding-left: 0;
}

.section-header .section-tag::before {
    display: none;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-main);
    margin-bottom: 1.2rem;
}

.section-title em {
    font-style: italic;
    color: var(--red);
}

.section-desc {
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.75;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

/* ─── Reveal ─── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}

.reveal-delay-5 {
    transition-delay: 0.5s;
}

/* ─── Keyframes ─── */
@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes dotPulse {

    0%,
    80%,
    100% {
        transform: scale(0.4);
        opacity: 0.3;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes marqueeRun {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@keyframes spinSlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spinCW {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spinCCW {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

@keyframes floatY {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-14px);
    }
}

@keyframes glowBeat {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(211, 47, 47, 0.3);
    }

    50% {
        box-shadow: 0 0 50px rgba(211, 47, 47, 0.6);
    }
}

@keyframes lineGrow {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes scaleIn {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/* ─── Promo Code Styles ─── */
.promo-code-section {
    position: relative;
}

.promo-input-group {
    display: flex;
    gap: 0.5rem;
}

.promo-input-group .form-control {
    flex: 1;
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    border-radius: 2px;
    background: var(--bg-card);
    transition: border-color 0.3s;
}

.promo-input-group .form-control:focus {
    outline: none;
    border-color: var(--red);
}

.promo-msg {
    font-size: 0.75rem;
    min-height: 1.2rem;
}

.promo-msg.success {
    color: #2e7d32;
}

.promo-msg.error {
    color: var(--red);
}

.discount-line {
    color: #2e7d32;
    font-weight: 500;
}

.discount-amount {
    color: #2e7d32;
}

.hidden {
    display: none !important;
}

/* ─── Floating WhatsApp ─── */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    z-index: 999;
    transition: all 0.4s var(--spring);
    cursor: none;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.45);
}

.whatsapp-badge {
    position: absolute;
    right: 75px;
    background: #fff;
    color: #111;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--shadow-light);
    opacity: 0;
    transform: translateX(15px);
    transition: all 0.3s var(--ease);
    pointer-events: none;
    border: 1px solid var(--border);
}

.whatsapp-badge::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    border-right: 1px solid var(--border);
    border-top: 1px solid var(--border);
}

.whatsapp-float:hover .whatsapp-badge {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 54px;
        height: 54px;
        font-size: 28px;
        cursor: auto;
    }
    .whatsapp-badge {
        display: none;
    }
}