
/* =========================================
   THE KRISHNA HANDLOOM
   Premium Traditional Modern Design
========================================= */


/* 1. GLOBAL VARIABLES */

:root {
    --bg: #f8f6f1;
    --surface: #ffffff;
    --cream: #eee8dc;
    --brown: #70583f;
    --brown-dark: #493927;
    --gold: #b49a70;
    --text: #29251f;
    --muted: #81796e;
    --border: #e8e2d8;

    --heading: 'Playfair Display', serif;
    --body: 'DM Sans', sans-serif;

    --shadow: 0 12px 35px rgba(57, 43, 27, 0.07);
    --radius: 14px;
}


/* 2. RESET */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    line-height: 1.6;
    overflow-x: hidden;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

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

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


/* 3. ANNOUNCEMENT BAR */

.announcement-bar {
    background: var(--brown-dark);
    color: #fff;
    text-align: center;
    padding: 9px 15px;
    font-size: 11px;
    letter-spacing: 1.5px;
}


/* 4. HEADER */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(248, 246, 241, 0.96);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1250px;
    margin: auto;
    padding: 17px 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-main {
    font-family: var(--heading);
    font-size: 25px;
    letter-spacing: 3px;
    font-weight: 600;
    color: var(--brown-dark);
}

.logo-sub {
    font-size: 9px;
    letter-spacing: 5px;
    text-align: center;
    color: var(--gold);
    margin-top: 5px;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 35px;
}

.navigation a {
    font-size: 13px;
    color: var(--muted);
    transition: color 0.3s;
}

.navigation a:hover {
    color: var(--brown);
}

.menu-toggle {
    display: none;
    border: none;
    background: none;
    color: var(--brown-dark);
    font-size: 25px;
    cursor: pointer;
}


/* 5. HERO */

.hero {
    max-width: 1350px;
    min-height: 550px;
    margin: auto;
    padding: 65px 55px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: 65px;
}

.hero-content {
    padding-left: 15px;
}

.eyebrow {
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    display: block;
    margin-bottom: 17px;
}

.hero h1 {
    font-family: var(--heading);
    font-size: clamp(42px, 5vw, 68px);
    font-weight: 500;
    line-height: 1.12;
    color: var(--brown-dark);
}

.hero h1 em {
    color: var(--gold);
    font-weight: 400;
}

.hero-content p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
    max-width: 410px;
    margin: 25px 0 32px;
}

.hero-image {
    height: 420px;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s;
}

.hero-image:hover img {
    transform: scale(1.04);
}


/* 6. BUTTONS */

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: var(--brown);
    color: white;
    padding: 15px 25px;
    border: 1px solid var(--brown);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    transition: all 0.3s;
    cursor: pointer;
}

.primary-btn:hover {
    background: var(--brown-dark);
    border-color: var(--brown-dark);
    transform: translateY(-2px);
}

.secondary-btn {
    background: transparent;
    color: var(--brown);
    border: 1px solid var(--brown);
    padding: 12px 22px;
    cursor: pointer;
    transition: 0.3s;
}

.secondary-btn:hover {
    background: var(--brown);
    color: white;
}

.text-link {
    color: var(--brown);
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid var(--gold);
    padding-bottom: 5px;
}


/* 7. FEATURES */

.features {
    max-width: 1150px;
    margin: 0 auto;
    padding: 35px 25px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px;
}

.feature > span {
    font-size: 27px;
    color: var(--gold);
}

.feature h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--brown-dark);
}

.feature p {
    color: var(--muted);
    font-size: 10px;
    margin-top: 3px;
}


/* 8. GENERAL SECTIONS */

.section {
    max-width: 1250px;
    margin: auto;
    padding: 95px 35px;
}

.section-heading {
    text-align: center;
    margin-bottom: 45px;
}

.section-heading h2,
.about-content h2,
.contact h2 {
    font-family: var(--heading);
    font-size: clamp(30px, 4vw, 43px);
    color: var(--brown-dark);
    font-weight: 500;
    line-height: 1.2;
}

.section-heading p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 12px;
}


/* 9. CATEGORY GRID */

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.category-card {
    position: relative;
    height: 310px;
    overflow: hidden;
    background: var(--cream);
    cursor: pointer;
    border-radius: 4px;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s;
}

.category-card:hover img {
    transform: scale(1.07);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        transparent 35%,
        rgba(0, 0, 0, 0.65)
    );
}

.category-info {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 20px;
    color: white;
    z-index: 2;
}

.category-info h3 {
    font-family: var(--heading);
    font-size: 25px;
    font-weight: 500;
}

.category-info span {
    font-size: 11px;
    opacity: 0.9;
}


/* 10. PRODUCT CONTROLS */

.product-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.search-box {
    flex: 1;
    max-width: 450px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--border);
}

.search-box span {
    font-size: 22px;
    color: var(--gold);
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    color: var(--text);
    font-size: 12px;
}

.product-controls select {
    background: white;
    border: 1px solid var(--border);
    padding: 13px 16px;
    outline: none;
    color: var(--brown-dark);
    font-size: 12px;
    max-width: 220px;
}

.active-filter {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 22px;
}


/* 11. PRODUCT GRID */

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 22px;
}

.product-card {
    background: white;
    overflow: hidden;
    border: 1px solid #eee9e0;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

.product-image {
    height: 285px;
    position: relative;
    overflow: hidden;
    background: var(--cream);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

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

.product-info {
    padding: 19px;
}

.product-category {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--gold);
    letter-spacing: 1.5px;
    font-weight: 700;
}

.product-info h3 {
    font-family: var(--heading);
    color: var(--brown-dark);
    font-size: 19px;
    font-weight: 500;
    margin: 7px 0;
}

.product-info p {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
}

.product-action {
    margin-top: 15px;
    padding-top: 13px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--brown);
    font-size: 11px;
    font-weight: 600;
}


/* 12. LOADING AND EMPTY STATES */

.loading-message,
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 65px 15px;
    color: var(--muted);
}

.empty-state[hidden] {
    display: none !important;
}

.empty-icon {
    font-size: 35px;
    color: var(--gold);
    margin-bottom: 10px;
}

.empty-state h3 {
    font-family: var(--heading);
    font-size: 25px;
    color: var(--brown-dark);
    font-weight: 500;
}

.empty-state p {
    font-size: 12px;
    margin: 10px 0 20px;
}


/* 13. ABOUT SECTION */

.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 75px;
    background: var(--cream);
    max-width: 100%;
    padding-left: max(35px, calc((100vw - 1180px) / 2));
    padding-right: max(35px, calc((100vw - 1180px) / 2));
}

.about-image {
    height: 420px;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content p {
    color: var(--muted);
    font-size: 13px;
    line-height: 2;
    margin: 22px 0 28px;
    max-width: 430px;
}


/* 14. CONTACT SECTION */

.contact {
    text-align: center;
}

.contact h2 {
    margin-bottom: 15px;
}

.contact p {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 25px;
}

.whatsapp-btn {
    background: #456c4e;
    border-color: #456c4e;
}

.whatsapp-btn:hover {
    background: #31543a;
    border-color: #31543a;
}


/* 15. FOOTER */

.footer {
    background: var(--brown-dark);
    color: #fff;
    text-align: center;
    padding: 55px 20px 20px;
}

.footer-logo {
    font-family: var(--heading);
    font-size: 22px;
    letter-spacing: 3px;
}

.footer > p {
    color: #d3c7b6;
    font-size: 11px;
    margin-top: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin: 30px 0;
}

.footer-links a {
    font-size: 11px;
    color: #e4d9ca;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 20px;
    color: #c4b7a6;
    font-size: 10px;
}


/* 16. PRODUCT MODAL */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(25, 22, 18, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay[hidden] {
    display: none !important;
}

.product-modal {
    background: var(--bg);
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    padding: 30px;
    gap: 30px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 30px;
    color: var(--brown-dark);
    cursor: pointer;
    z-index: 2;
}

.modal-gallery > img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    background: var(--cream);
}

.modal-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
}

.modal-thumbnails img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
}

.modal-thumbnails img.active {
    border-color: var(--brown);
}

.modal-details {
    align-self: center;
    padding: 15px;
}

.modal-details h2 {
    font-family: var(--heading);
    font-size: 31px;
    font-weight: 500;
    color: var(--brown-dark);
    margin-bottom: 15px;
}

.modal-details p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
    margin-bottom: 30px;
}


/* 17. RESPONSIVE DESIGN - TABLETS */

@media (max-width: 900px) {

    .hero {
        gap: 35px;
        padding: 55px 30px;
    }

    .hero-image {
        height: 350px;
    }

    .category-grid {
        gap: 15px;
    }

    .category-card {
        height: 260px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about {
        gap: 35px;
    }

}


/* 18. RESPONSIVE DESIGN - MOBILE */

@media (max-width: 650px) {

    .announcement-bar {
        font-size: 9px;
        padding: 8px;
    }

    .header-inner {
        padding: 14px 20px;
    }

    .logo-main {
        font-size: 21px;
    }

    .menu-toggle {
        display: block;
    }

    .navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg);
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        border-bottom: 1px solid var(--border);
    }

    .navigation.active {
        display: flex;
    }

    .navigation a {
        font-size: 14px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 50px 22px 35px;
        gap: 30px;
        min-height: auto;
    }

    .hero-content {
        padding: 0;
    }

    .hero h1 {
        font-size: 45px;
    }

    .hero-content p {
        font-size: 12px;
        margin: 18px 0 25px;
    }

    .hero-image {
        height: 280px;
    }

    .features {
        grid-template-columns: 1fr;
        padding: 18px;
        gap: 10px;
    }

    .feature {
        justify-content: flex-start;
        padding: 8px 12px;
    }

    .section {
        padding: 65px 20px;
    }

    .section-heading {
        margin-bottom: 30px;
    }

    .section-heading h2,
    .about-content h2,
    .contact h2 {
        font-size: 32px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card {
        height: 210px;
    }

    .category-info {
        bottom: 15px;
        left: 13px;
    }

    .category-info h3 {
        font-size: 19px;
    }

    .category-info span {
        font-size: 9px;
    }

    .product-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: none;
    }

    .product-controls select {
        max-width: none;
        width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

    .product-image {
        height: 190px;
    }

    .product-info {
        padding: 12px;
    }

    .product-info h3 {
        font-size: 15px;
    }

    .product-info p {
        font-size: 10px;
    }

    .product-action {
        font-size: 9px;
    }

    .about {
        grid-template-columns: 1fr;
        padding: 55px 20px;
        gap: 30px;
    }

    .about-image {
        height: 280px;
    }

    .about-content p {
        font-size: 12px;
    }

    .contact {
        padding: 65px 20px;
    }

    .footer-links {
        gap: 17px;
        flex-wrap: wrap;
    }

    .product-modal {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 15px;
    }

    .modal-gallery > img {
        height: 260px;
    }

    .modal-details {
        padding: 10px 0;
    }

    .modal-details h2 {
        font-size: 25px;
    }

}


/* 19. SMALL MOBILE SCREENS */

@media (max-width: 360px) {

    .hero h1 {
        font-size: 38px;
    }

    .category-card {
        height: 175px;
    }

    .product-image {
        height: 155px;
    }

    .product-info h3 {
        font-size: 13px;
    }

}


/* 20. ACCESSIBILITY */

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

}


/* ==========================================
   CUSTOMER UPGRADE
   SUBCATEGORIES + PRODUCT GALLERY
========================================== */


/* SUBCATEGORY FILTER */

#subcategoryFilter {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 13px 16px;
    outline: none;
    color: var(--brown-dark);
    font-size: 12px;
    max-width: 220px;
    min-width: 170px;
    cursor: pointer;
}

#subcategoryFilter:focus {
    border-color: var(--gold);
}


/* PRODUCT PHOTO COUNT */

.product-image {
    position: relative;
}

.product-image-count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(73, 57, 39, 0.88);
    color: white;
    padding: 6px 10px;
    font-size: 9px;
    letter-spacing: 0.5px;
    border-radius: 3px;
}


/* PRODUCT GALLERY */

.modal-gallery {
    position: relative;
    min-width: 0;
}

.modal-gallery > img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    background: var(--cream);
}


/* GALLERY NAVIGATION */

.gallery-navigation {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 155px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.gallery-navigation[hidden] {
    display: none !important;
}

.gallery-arrow {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(73, 57, 39, 0.85);
    color: white;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: background 0.2s, transform 0.2s;
}

.gallery-arrow:hover {
    background: var(--brown-dark);
    transform: scale(1.08);
}

.gallery-counter {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -165px;
    background: rgba(73, 57, 39, 0.85);
    color: white;
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 10px;
    pointer-events: none;
}


/* GALLERY THUMBNAILS */

.modal-thumbnails {
    padding-bottom: 5px;
    scrollbar-width: thin;
}

.modal-thumbnails img {
    flex: 0 0 65px;
    border-radius: 3px;
    opacity: 0.7;
    transition: opacity 0.2s, border-color 0.2s;
}

.modal-thumbnails img.active {
    opacity: 1;
    border-color: var(--gold);
}


/* MOBILE SUBCATEGORY FILTER */

@media (max-width: 650px) {

    #subcategoryFilter {
        max-width: none;
        width: 100%;
    }

    .gallery-navigation {
        top: 112px;
    }

    .gallery-counter {
        bottom: -122px;
    }

    .gallery-arrow {
        width: 34px;
        height: 34px;
    }

    .modal-gallery > img {
        height: 260px;
    }

}


/* GALLERY POSITION REFINEMENT */

.gallery-navigation {
    inset: 0;
    top: 0;
    bottom: auto;
    height: 100%;
}

.gallery-counter {
    left: auto;
    right: 10px;
    top: 10px;
    bottom: auto;
    transform: none;
}
/* ==========================================
   KRISHNA HANDLOOM SOCIAL MEDIA
========================================== */

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin: 25px 0;
}

.social-links a {
    width: 43px;
    height: 43px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--brown);
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: 0.25s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: var(--brown);
    color: white;
    transform: translateY(-4px);
}

.social-links svg {
    width: 20px;
    height: 20px;
}


/* ==========================================
   FLOATING WHATSAPP BUTTON
========================================== */

.floating-whatsapp {
    position: fixed;
    right: 20px;
    bottom: 25px;
    width: 56px;
    height: 56px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #25D366;
    color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.20);
    z-index: 999;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.floating-whatsapp svg {
    width: 29px;
    height: 29px;
    display: block;
    margin: 0;
}

.floating-whatsapp:hover {
    transform: scale(1.08);
    box-shadow: 0 7px 22px rgba(0, 0, 0, 0.25);
}


/* MOBILE */
@media (max-width: 600px) {

    .social-links {
        gap: 15px;
    }

    .social-links a {
        width: 40px;
        height: 40px;
    }

    .floating-whatsapp {
        right: 16px;
        bottom: 20px;
        width: 53px;
        height: 53px;
    }

}

