
/* ==========================================
   AARAMBHA PRODUCT CATALOG
========================================== */

:root {
    --ae-brown: #88431f;
    --ae-green: #60bc4d;
    --ae-dark: #17251b;
    --ae-text: #253329;
    --ae-muted: #778078;
    --ae-border: #e8ece8;
    --ae-light: #f7f9f6;
}

.product-container {
    width: min(1200px, calc(100% - 40px));
    margin: auto;
}

/* ==========================================
   HERO SECTION
========================================== */

.product-hero {
    position: relative;
    overflow: hidden;
    padding: 32px 0 55px;
    background: linear-gradient(120deg, #f6f8f4, #fff);
    border-bottom: 1px solid #edf0eb;
}

.product-hero::after {
    content: "";
    position: absolute;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    right: -100px;
    top: -170px;
    background: rgba(96,188,77,.08);
}

.product-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--ae-muted);
    margin-bottom: 35px;
}

.product-breadcrumb a {
    color: var(--ae-brown);
    text-decoration: none;
}

.product-breadcrumb a:hover {
    color: var(--ae-green);
}

.product-breadcrumb i {
    font-size: 10px;
}

.product-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.product-eyebrow,
.section-label {
    display: inline-block;
    color: var(--ae-green);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.7px;
    margin-bottom: 12px;
}

.product-hero h1 {
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    color: var(--ae-dark);
    margin: 0 0 12px;
    letter-spacing: -1.3px;
}

.product-hero-content p {
    max-width: 600px;
    margin: 0;
    color: #68746b;
    font-size: 15px;
    line-height: 1.8;
}

.hero-decoration {
    width: 125px;
    height: 125px;
    min-width: 125px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
    background: #fff;
    color: var(--ae-brown);
    font-size: 65px;
    box-shadow: 0 12px 35px rgba(0,0,0,.06);
    transform: rotate(5deg);
}

/* ==========================================
   MAIN CATALOG SECTION
========================================== */

.product-section {
    padding: 65px 0 85px;
    background: #fff;
}

.catalog-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.catalog-heading h2 {
    color: var(--ae-dark);
    font-size: clamp(25px, 3vw, 32px);
    font-weight: 800;
    margin: 0 0 8px;
}

.catalog-heading p {
    color: var(--ae-muted);
    font-size: 14px;
    margin: 0;
}

.catalog-total {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ae-brown);
    background: #fbf7f4;
    padding: 11px 16px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* ==========================================
   SEARCH AND SORT
========================================== */

.catalog-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 25px;
}

.product-search {
    position: relative;
    flex: 1;
}

.product-search > i {
    position: absolute;
    top: 50%;
    left: 17px;
    transform: translateY(-50%);
    color: #8b968d;
    font-size: 17px;
}

.product-search input {
    width: 100%;
    height: 49px;
    padding: 0 45px;
    border: 1px solid var(--ae-border);
    border-radius: 9px;
    outline: none;
    background: #fff;
    font-size: 13px;
    color: var(--ae-text);
    transition: .2s;
}

.product-search input:focus {
    border-color: var(--ae-green);
    box-shadow: 0 0 0 3px rgba(96,188,77,.10);
}

.clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: #879187;
    cursor: pointer;
    font-size: 17px;
}

.clear-search[hidden] {
    display: none;
}

.catalog-sort {
    height: 49px;
    min-width: 185px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    border: 1px solid var(--ae-border);
    border-radius: 9px;
    color: var(--ae-brown);
}

.catalog-sort select {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: #465248;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* ==========================================
   CATEGORY TABS
========================================== */

.category-wrapper {
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid var(--ae-border);
    margin-bottom: 28px;
}

.category-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 13px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5ca transparent;
}

.category-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-shrink: 0;
    padding: 11px 17px;
    border: 1px solid #e8ece7;
    border-radius: 7px;
    background: #fff;
    color: #5d695f;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}

.category-tab:hover {
    border-color: var(--ae-green);
    color: var(--ae-brown);
    background: #f8fbf6;
}

.category-tab.active {
    background: var(--ae-brown);
    color: #fff;
    border-color: var(--ae-brown);
}

/* ==========================================
   RESULT BAR
========================================== */

.catalog-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 19px;
    font-size: 12px;
    color: var(--ae-muted);
}

.reset-filters {
    border: none;
    background: transparent;
    color: var(--ae-brown);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.reset-filters:hover {
    color: var(--ae-green);
}

/* ==========================================
   PRODUCT GRID
========================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.product-card {
    min-width: 0;
    position: relative;
    background: #fff;
    border: 1px solid #e9ede8;
    border-radius: 11px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(26,48,28,.09);
}

.product-image-wrap {
    height: 205px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9f7;
    padding: 16px;
    overflow: hidden;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .35s ease;
}

.product-card:hover .product-image-wrap img {
    transform: scale(1.06);
}

.product-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 58px;
    color: #c3cdc0;
}

.featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    border-radius: 4px;
    background: var(--ae-green);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .5px;
}

.product-card-body {
    padding: 17px;
}

.product-brand {
    color: var(--ae-green);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 7px;
}

.product-card h3 {
    color: var(--ae-dark);
    font-size: 15px;
    font-weight: 750;
    line-height: 1.5;
    margin: 0 0 7px;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-model {
    color: #849087;
    font-size: 11px;
    margin-bottom: 9px;
}

.product-description {
    color: #758078;
    font-size: 12px;
    line-height: 1.7;
    margin: 0 0 16px;
    min-height: 41px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-footer {
    border-top: 1px solid #edf0eb;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.product-category-name {
    font-size: 10px;
    color: #8a948c;
    max-width: 55%;
}

.view-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: none;
    color: var(--ae-brown);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.view-details-btn:hover {
    color: var(--ae-green);
}

/* ==========================================
   LOADING AND EMPTY STATE
========================================== */

.catalog-loading,
.catalog-empty,
.modal-loading {
    grid-column: 1 / -1;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    color: var(--ae-muted);
    font-size: 13px;
}

.loading-spinner {
    width: 35px;
    height: 35px;
    border: 3px solid #e7eee4;
    border-top-color: var(--ae-green);
    border-radius: 50%;
    animation: aeSpin .7s linear infinite;
}

@keyframes aeSpin {
    to { transform: rotate(360deg); }
}

.catalog-empty i {
    font-size: 42px;
    color: #bdc8bb;
}

.catalog-empty h3 {
    color: var(--ae-dark);
    font-size: 18px;
    margin: 0;
}

.catalog-empty p {
    margin: 0;
}

/* ==========================================
   PAGINATION
========================================== */

.product-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 35px;
}

.page-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ae-border);
    border-radius: 7px;
    background: #fff;
    color: #58645a;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.page-btn:hover,
.page-btn.active {
    background: var(--ae-brown);
    border-color: var(--ae-brown);
    color: #fff;
}

.page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ==========================================
   PRODUCT DETAILS MODAL
========================================== */

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-modal.open {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,27,18,.75);
    backdrop-filter: blur(3px);
}

.product-modal-dialog {
    width: min(850px, 100%);
    max-height: 90vh;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    padding: 30px;
}

.modal-close {
    position: absolute;
    top: 13px;
    right: 13px;
    z-index: 2;
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: #f1f4ef;
    color: #38463a;
    cursor: pointer;
}

.modal-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.modal-product-image {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f9f6;
    border-radius: 10px;
    padding: 20px;
}

.modal-product-image img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
}

.modal-product-info {
    padding: 10px 0;
}

.modal-product-info h2 {
    font-size: 25px;
    color: var(--ae-dark);
    margin: 8px 0 10px;
}

.modal-product-info p {
    color: #6e7a70;
    font-size: 13px;
    line-height: 1.8;
}

.modal-specifications {
    margin-top: 22px;
    padding-top: 17px;
    border-top: 1px solid var(--ae-border);
}

.modal-specifications h4 {
    font-size: 14px;
    color: var(--ae-dark);
    margin-bottom: 12px;
}

.modal-specifications pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.8;
    color: #647168;
}

/* ==========================================
   RESPONSIVE TABLET
========================================== */

@media (max-width: 991px) {

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .product-image-wrap {
        height: 180px;
    }

}

/* ==========================================
   RESPONSIVE MOBILE
========================================== */

@media (max-width: 767px) {

    .product-container {
        width: calc(100% - 30px);
    }

    .product-hero {
        padding: 25px 0 38px;
    }

    .product-breadcrumb {
        margin-bottom: 25px;
    }

    .hero-decoration {
        width: 75px;
        height: 75px;
        min-width: 75px;
        font-size: 38px;
        border-radius: 17px;
    }

    .product-hero-content p {
        font-size: 13px;
    }

    .product-section {
        padding: 42px 0 55px;
    }

    .catalog-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog-sort {
        width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-image-wrap {
        height: 150px;
        padding: 10px;
    }

    .product-card-body {
        padding: 12px;
    }

    .product-card h3 {
        font-size: 13px;
        min-height: 39px;
    }

    .product-description {
        font-size: 11px;
    }

    .product-category-name {
        display: none;
    }

    .product-card-footer {
        justify-content: flex-end;
    }

    .product-modal-dialog {
        padding: 20px;
    }

    .modal-product-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .modal-product-image {
        min-height: 200px;
    }

    .modal-product-image img {
        max-height: 220px;
    }

    .modal-product-info h2 {
        font-size: 21px;
    }

}

/* SMALL MOBILE */

@media (max-width: 380px) {

    .product-grid {
        gap: 9px;
    }

    .product-image-wrap {
        height: 125px;
    }

    .product-card-body {
        padding: 10px;
    }

    .product-card h3 {
        font-size: 12px;
    }

    .view-details-btn {
        font-size: 10px;
    }

    .product-eyebrow {
        font-size: 9px;
    }

}
