/* ==========================================================================
   KHUSHIYA GIFTS
   Products Archive
   ========================================================================== */

:root {
    --kg-gold: #c58a32;
    --kg-gold-dark: #a86f20;
    --kg-gold-light: #f5ead8;

    --kg-dark: #252525;
    --kg-text: #404040;
    --kg-muted: #77736d;

    --kg-white: #ffffff;
    --kg-cream: #fdfaf5;
    --kg-cream-dark: #f7f1e8;

    --kg-border: #e9e1d6;

    --kg-radius: 12px;
    --kg-radius-small: 8px;

    --kg-shadow: 0 8px 30px rgba(42, 33, 21, 0.07);
    --kg-shadow-hover: 0 16px 38px rgba(42, 33, 21, 0.12);
}


/* ==========================================================================
   Base
   ========================================================================== */

.kg-products-archive {
    background: var(--kg-white);
    color: var(--kg-text);
    width: 100%;
}

.kg-products-archive *,
.kg-products-archive *::before,
.kg-products-archive *::after {
    box-sizing: border-box;
}

.kg-container {
    width: min(1320px, calc(100% - 48px));
    margin: 0 auto;
}


/* ==========================================================================
   Archive Hero
   ========================================================================== */

.kg-archive-hero {
    background: var(--kg-cream);
    border-bottom: 1px solid var(--kg-border);
    padding: 26px 0 52px;
}


/* Breadcrumb */

.kg-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;

    margin: 0 0 35px;

    font-size: 13px;
    line-height: 1.5;
    color: var(--kg-muted);
}

.kg-breadcrumb a {
    color: var(--kg-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.kg-breadcrumb a:hover {
    color: var(--kg-gold-dark);
}

.kg-breadcrumb-separator {
    color: #b7afa5;
}


/* Hero Heading */

.kg-archive-heading {
    max-width: 780px;
}

.kg-archive-eyebrow {
    display: inline-block;
    margin-bottom: 10px;

    color: var(--kg-gold-dark);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;

    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.kg-archive-heading h1 {
    margin: 0 0 14px;

    color: var(--kg-dark);
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -1px;
}

.kg-archive-heading p {
    max-width: 720px;
    margin: 0;

    color: var(--kg-muted);
    font-size: 17px;
    line-height: 1.75;
}


/* ==========================================================================
   Products Section
   ========================================================================== */

.kg-products-section {
    padding: 46px 0 80px;
}


/* ==========================================================================
   Search
   ========================================================================== */

.kg-product-search {
    margin-bottom: 24px;
}

.kg-search-field {
    position: relative;
    width: 100%;
}

.kg-search-field input {
    width: 100%;
    height: 58px;

    padding: 0 64px 0 20px;

    border: 1px solid var(--kg-border);
    border-radius: var(--kg-radius-small);

    background: var(--kg-white);
    color: var(--kg-dark);

    font-size: 15px;
    line-height: 1;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.kg-search-field input::placeholder {
    color: #99938b;
}

.kg-search-field input:focus {
    border-color: var(--kg-gold);
    box-shadow: 0 0 0 3px rgba(197, 138, 50, 0.11);
}

.kg-search-button {
    position: absolute;
    top: 7px;
    right: 7px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    padding: 0;

    border: 0;
    border-radius: 7px;

    background: var(--kg-gold);
    color: var(--kg-white);

    font-size: 17px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.kg-search-button:hover {
    background: var(--kg-gold-dark);
}

.kg-search-button:active {
    transform: scale(0.97);
}


/* ==========================================================================
   Filter Area
   ========================================================================== */

.kg-filter-area {
    margin-bottom: 34px;
    padding: 25px;

    background: var(--kg-cream);
    border: 1px solid var(--kg-border);
    border-radius: var(--kg-radius);
}

.kg-filter-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 20px;
}

.kg-filter-label {
    display: block;
    margin-bottom: 4px;

    color: var(--kg-gold-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.kg-filter-header h2 {
    margin: 0;

    color: var(--kg-dark);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}


/* Clear Filters */

.kg-clear-filters {
    padding: 0;

    border: 0;
    background: transparent;

    color: var(--kg-gold-dark);

    font-size: 13px;
    font-weight: 600;

    text-decoration: underline;
    text-underline-offset: 3px;

    cursor: pointer;
}

.kg-clear-filters:hover {
    color: var(--kg-dark);
}


/* ==========================================================================
   Filter Grid
   ========================================================================== */

.kg-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.kg-filter-group {
    min-width: 0;
}

.kg-filter-group label {
    display: block;
    margin: 0 0 7px;

    color: var(--kg-dark);

    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
}

.kg-filter-select,
.kg-sort-select {
    width: 100%;
    height: 48px;

    padding: 0 38px 0 14px;

    border: 1px solid var(--kg-border);
    border-radius: 7px;

    background-color: var(--kg-white);
    color: var(--kg-text);

    font-size: 14px;

    outline: none;
    cursor: pointer;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.kg-filter-select:hover,
.kg-sort-select:hover {
    border-color: #d5c5af;
}

.kg-filter-select:focus,
.kg-sort-select:focus {
    border-color: var(--kg-gold);
    box-shadow: 0 0 0 3px rgba(197, 138, 50, 0.10);
}


/* ==========================================================================
   Active Filter Chips
   ========================================================================== */

.kg-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 0;
}

.kg-active-filters:not(:empty) {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--kg-border);
}

.kg-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    min-height: 32px;

    padding: 5px 10px;

    border: 1px solid #e5d2b6;
    border-radius: 30px;

    background: var(--kg-gold-light);
    color: #72501f;

    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
}

.kg-filter-chip button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: inherit;

    font-size: 15px;
    line-height: 1;

    cursor: pointer;
}


/* ==========================================================================
   Toolbar
   ========================================================================== */

.kg-products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    margin-bottom: 24px;
}

.kg-product-count {
    display: flex;
    align-items: baseline;
    gap: 6px;

    color: var(--kg-muted);
    font-size: 14px;
}

.kg-product-count strong {
    color: var(--kg-dark);
    font-size: 17px;
    font-weight: 700;
}

.kg-product-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kg-product-sort label {
    white-space: nowrap;

    color: var(--kg-muted);
    font-size: 13px;
}

.kg-product-sort .kg-sort-select {
    width: 190px;
    height: 42px;
}


/* ==========================================================================
   Product Grid
   ========================================================================== */

.kg-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}


/* ==========================================================================
   Product Card
   ========================================================================== */

.kg-product-card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;
    margin: 0;

    overflow: hidden;

    background: var(--kg-white);

    border: 1px solid var(--kg-border);
    border-radius: var(--kg-radius);

    box-shadow: 0 2px 10px rgba(42, 33, 21, 0.025);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.kg-product-card:hover {
    transform: translateY(-4px);
    border-color: #dfc69f;
    box-shadow: var(--kg-shadow-hover);
}


/* ==========================================================================
   Product Image
   ========================================================================== */

.kg-product-image {
    position: relative;

    display: block;

    width: 100%;
    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: var(--kg-cream);

    text-decoration: none;
}

.kg-product-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    padding: 12px;

    transition: transform 0.35s ease;
}

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


/* Placeholder */

.kg-product-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    padding: 20px;

    background: var(--kg-cream-dark);
}

.kg-product-image-placeholder span {
    color: #a69b8d;

    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}


/* ==========================================================================
   Product Content
   ========================================================================== */

.kg-product-content {
    display: flex;
    flex: 1;
    flex-direction: column;

    padding: 18px;
}


/* Category */

.kg-product-category {
    display: block;

    margin-bottom: 7px;

    color: var(--kg-gold-dark);

    font-size: 10px;
    line-height: 1.4;
    font-weight: 700;

    letter-spacing: 1px;
    text-transform: uppercase;
}


/* Product Title */

.kg-product-title {
    margin: 0 0 10px;

    color: var(--kg-dark);

    font-size: 17px;
    line-height: 1.4;
    font-weight: 600;
}

.kg-product-title a {
    color: inherit;
    text-decoration: none;
}

.kg-product-title a:hover {
    color: var(--kg-gold-dark);
}


/* Product Code */

.kg-product-code {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;

    margin-bottom: 15px;

    color: var(--kg-muted);

    font-size: 11px;
    line-height: 1.4;
}

.kg-product-code strong {
    color: var(--kg-text);
    font-weight: 600;
}


/* ==========================================================================
   Price
   ========================================================================== */

.kg-product-price {
    margin: 0 0 16px;
}

.kg-price-label {
    display: block;

    margin-bottom: 4px;

    color: var(--kg-muted);

    font-size: 11px;
    line-height: 1.3;
}

.kg-price-values {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.kg-original-price {
    color: #9c9690;

    font-size: 13px;
    font-weight: 500;
}

.kg-starting-price {
    color: var(--kg-dark);

    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
}


/* ==========================================================================
   Product Card Footer
   ========================================================================== */

.kg-product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-top: auto;
    padding-top: 14px;

    border-top: 1px solid #eee8df;
}


/* MOQ */

.kg-product-moq {
    display: flex;
    flex-direction: column;
    gap: 1px;

    color: var(--kg-muted);

    font-size: 10px;
    line-height: 1.3;
}

.kg-product-moq strong {
    color: var(--kg-dark);

    font-size: 12px;
    font-weight: 600;
}


/* View Product */

.kg-view-product {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--kg-gold-dark);

    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;

    text-decoration: none;

    transition: color 0.2s ease;
}

.kg-view-product span {
    font-size: 16px;
    line-height: 1;

    transition: transform 0.2s ease;
}

.kg-view-product:hover {
    color: var(--kg-dark);
}

.kg-view-product:hover span {
    transform: translateX(3px);
}


/* ==========================================================================
   No Products
   ========================================================================== */

.kg-no-products {
    grid-column: 1 / -1;

    padding: 70px 25px;

    text-align: center;

    border: 1px solid var(--kg-border);
    border-radius: var(--kg-radius);

    background: var(--kg-cream);
}

.kg-no-products h2 {
    margin: 0 0 8px;

    color: var(--kg-dark);

    font-size: 23px;
    font-weight: 700;
}

.kg-no-products p {
    margin: 0;

    color: var(--kg-muted);

    font-size: 14px;
}


/* ==========================================================================
   Load More
   ========================================================================== */

.kg-load-more-wrap {
    display: flex;
    justify-content: center;

    margin-top: 45px;
}

.kg-load-more {
    min-width: 220px;
    min-height: 50px;

    padding: 13px 25px;

    border: 1px solid var(--kg-gold);
    border-radius: 7px;

    background: var(--kg-gold);
    color: var(--kg-white);

    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;

    letter-spacing: 0.4px;
    text-transform: uppercase;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.kg-load-more:hover {
    background: var(--kg-gold-dark);
    border-color: var(--kg-gold-dark);

    box-shadow: 0 8px 20px rgba(168, 111, 32, 0.17);
}

.kg-load-more:active {
    transform: translateY(1px);
}

.kg-load-more:disabled {
    opacity: 0.6;
    cursor: wait;
}


/* ==========================================================================
   Bulk Corporate CTA
   ========================================================================== */

.kg-archive-cta {
    padding: 0 0 80px;

    background: var(--kg-white);
}

.kg-archive-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;

    padding: 42px 46px;

    border: 1px solid #e7d6bd;
    border-radius: 14px;

    background: var(--kg-cream);
}

.kg-archive-cta-content {
    max-width: 720px;
}

.kg-archive-cta-content > span {
    display: block;

    margin-bottom: 7px;

    color: var(--kg-gold-dark);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.kg-archive-cta-content h2 {
    margin: 0 0 10px;

    color: var(--kg-dark);

    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.2;
    font-weight: 700;
}

.kg-archive-cta-content p {
    margin: 0;

    color: var(--kg-muted);

    font-size: 14px;
    line-height: 1.7;
}


/* CTA Button */

.kg-bulk-quote-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-width: 180px;
    min-height: 50px;

    padding: 13px 22px;

    border-radius: 7px;

    background: var(--kg-gold);
    color: var(--kg-white);

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;
    white-space: nowrap;

    transition:
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.kg-bulk-quote-button:hover {
    background: var(--kg-gold-dark);
    color: var(--kg-white);

    box-shadow: 0 8px 20px rgba(168, 111, 32, 0.18);
}

.kg-bulk-quote-button span {
    font-size: 17px;
}


/* ==========================================================================
   AJAX Loading State - Used in Next Step
   ========================================================================== */

.kg-products-grid.kg-loading {
    position: relative;

    min-height: 300px;

    opacity: 0.45;

    pointer-events: none;
}

.kg-products-grid.kg-loading::after {
    content: "";

    position: absolute;
    top: 80px;
    left: 50%;

    width: 38px;
    height: 38px;

    margin-left: -19px;

    border: 3px solid var(--kg-border);
    border-top-color: var(--kg-gold);
    border-radius: 50%;

    animation: kg-spin 0.7s linear infinite;
}

@keyframes kg-spin {
    to {
        transform: rotate(360deg);
    }
}


/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 1100px) {

    .kg-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    .kg-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ==========================================================================
   Tablet / Small Screens
   ========================================================================== */

@media (max-width: 767px) {

    .kg-container {
        width: min(100% - 30px, 1320px);
    }


    /* Hero */

    .kg-archive-hero {
        padding: 20px 0 35px;
    }

    .kg-breadcrumb {
        margin-bottom: 25px;
    }

    .kg-archive-heading h1 {
        font-size: 34px;
    }

    .kg-archive-heading p {
        font-size: 15px;
        line-height: 1.65;
    }


    /* Products */

    .kg-products-section {
        padding: 30px 0 55px;
    }


    /* Search */

    .kg-search-field input {
        height: 54px;
        font-size: 14px;
    }

    .kg-search-button {
        top: 5px;
        right: 5px;
    }


    /* Filter */

    .kg-filter-area {
        padding: 19px;
        margin-bottom: 26px;
    }

    .kg-filter-header {
        align-items: center;
    }

    .kg-filter-header h2 {
        font-size: 18px;
    }

    .kg-filter-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }


    /* Toolbar */

    .kg-products-toolbar {
        align-items: flex-end;
    }

    .kg-product-sort {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .kg-product-sort .kg-sort-select {
        width: 165px;
    }


    /* Grid */

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


    /* Card */

    .kg-product-content {
        padding: 14px;
    }

    .kg-product-title {
        font-size: 15px;
    }

    .kg-starting-price {
        font-size: 18px;
    }

    .kg-product-card-footer {
        align-items: flex-end;
    }

    .kg-view-product {
        font-size: 11px;
    }


    /* CTA */

    .kg-archive-cta {
        padding-bottom: 55px;
    }

    .kg-archive-cta-inner {
        flex-direction: column;
        align-items: flex-start;

        gap: 24px;

        padding: 30px 25px;
    }

}


/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 520px) {

    .kg-container {
        width: calc(100% - 24px);
    }


    /* Toolbar */

    .kg-products-toolbar {
        gap: 10px;
    }

    .kg-product-count {
        display: block;
    }

    .kg-product-count strong,
    .kg-product-count span {
        display: block;
    }

    .kg-product-sort .kg-sort-select {
        width: 145px;
    }


    /* Product Grid */

    .kg-products-grid {
        gap: 10px;
    }


    /* Product Image */

    .kg-product-image img {
        padding: 7px;
    }


    /* Card Content */

    .kg-product-content {
        padding: 11px;
    }

    .kg-product-category {
        margin-bottom: 5px;

        font-size: 9px;
        letter-spacing: 0.6px;
    }

    .kg-product-title {
        margin-bottom: 7px;

        font-size: 13px;
        line-height: 1.35;
    }

    .kg-product-code {
        margin-bottom: 10px;

        font-size: 9px;
    }


    /* Price */

    .kg-product-price {
        margin-bottom: 11px;
    }

    .kg-price-label {
        font-size: 9px;
    }

    .kg-original-price {
        font-size: 10px;
    }

    .kg-starting-price {
        font-size: 16px;
    }


    /* Card Footer */

    .kg-product-card-footer {
        display: block;

        padding-top: 10px;
    }

    .kg-product-moq {
        margin-bottom: 9px;
    }

    .kg-view-product {
        display: flex;
        justify-content: space-between;

        width: 100%;

        font-size: 10px;
    }


    /* Load More */

    .kg-load-more {
        width: 100%;
    }

}


/* ==========================================================================
   Accessibility
   ========================================================================== */

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


/* ==========================================================================
   Reduced Motion
   ========================================================================== */

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

    .kg-product-card,
    .kg-product-image img,
    .kg-view-product span,
    .kg-search-button,
    .kg-load-more {
        transition: none;
    }

    .kg-product-card:hover {
        transform: none;
    }

    .kg-product-card:hover .kg-product-image img {
        transform: none;
    }

}