/* GiftDala Category Listing Redesign */

.gd-catalog-page {
    --cat-primary: var(--primary-color, #980035);
    --cat-text: #172033;
    --cat-muted: #796d76;
    --cat-border: #eee2e7;
    --cat-soft: #fbf2f5;
    background: #fdf9fa;
    color: var(--cat-text);
    padding: 16px 0 65px;
}

.gd-catalog-page *,
.gd-catalog-page *::before,
.gd-catalog-page *::after {
    box-sizing: border-box;
}

.gd-catalog-container {
    max-width: 1250px;
    width: calc(100% - 36px);
    margin: auto;
}

.gd-catalog-page a {
    text-decoration: none;
}

.gd-cat-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--cat-muted);
    margin-bottom: 14px;
}

.gd-cat-breadcrumb a {
    color: var(--cat-muted);
}

.gd-cat-breadcrumb strong {
    color: var(--cat-text);
}

/* Hero */

.gd-cat-hero {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: space-between;
    min-height: 190px;
    padding: 30px;
    overflow: hidden;
    border: 1px solid #eadfe8;
    border-radius: 14px;
    background: linear-gradient(110deg, #eef2ff, #fff8fa);
    margin-bottom: 18px;
}

.gd-cat-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.gd-cat-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 30px;
    background: #fbdce5;
    color: var(--cat-primary);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 12px;
}

.gd-cat-eyebrow .material-symbols-rounded {
    font-size: 15px;
}

.gd-cat-hero h1 {
    font-family: Georgia, serif;
    font-size: clamp(27px, 3vw, 39px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 10px;
}

.gd-cat-hero p {
    font-size: 13px;
    line-height: 1.75;
    color: #65535c;
    margin: 0;
}

.gd-cat-hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

.gd-cat-hero-features > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #8b5166;
}

.gd-cat-hero-features .material-symbols-rounded {
    font-size: 16px;
}

.gd-cat-hero-photo {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 35%;
}

.gd-cat-hero-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, #f4f1fd, transparent 80%);
}

.gd-cat-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gd-cat-hero-art {
    position: absolute;
    right: 35px;
    bottom: -25px;
    transform: rotate(15deg);
    opacity: .16;
    color: var(--cat-primary);
}

.gd-cat-hero-art .material-symbols-rounded {
    font-size: 170px;
}

/* Category pills */

.gd-cat-pills {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 0 0 15px;
    margin-bottom: 13px;
    scrollbar-width: thin;
}

.gd-cat-pill {
    flex-shrink: 0;
    padding: 9px 15px;
    border: 1px solid #e9dce3;
    background: #f7f4fa;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    color: var(--cat-text);
    transition: .2s;
}

.gd-cat-pill:hover,
.gd-cat-pill.active {
    background: var(--cat-primary);
    border-color: var(--cat-primary);
    color: white;
}

/* Main layout */

.gd-cat-layout {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.gd-cat-sidebar {
    border: 1px solid var(--cat-border);
    border-radius: 13px;
    background: white;
    padding: 18px;
}

.gd-cat-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid var(--cat-border);
    padding-bottom: 15px;
}

.gd-cat-filter-head h2 {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 800;
    margin: 0;
}

.gd-cat-filter-head h2 span {
    font-size: 18px;
    color: var(--cat-primary);
}

.gd-cat-filter-head a {
    color: var(--cat-primary);
    font-size: 11px;
    font-weight: 700;
}

.gd-cat-filter-section {
    padding: 17px 0;
    border-bottom: 1px solid #f0e9ec;
}

.gd-cat-filter-section h3 {
    font-size: 13px;
    font-weight: 750;
    margin: 0 0 12px;
}

.gd-cat-filter-section input,
.gd-cat-filter-section select {
    width: 100%;
    min-height: 39px;
    padding: 8px 10px;
    border: 1px solid #e7dfe3;
    border-radius: 7px;
    background: white;
    color: var(--cat-text);
    font-size: 12px;
    outline: none;
}

.gd-cat-filter-section input:focus,
.gd-cat-filter-section select:focus {
    border-color: var(--cat-primary);
}

.gd-cat-price-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.gd-cat-price-inputs label {
    display: block;
    font-size: 11px;
    margin-bottom: 5px;
    color: var(--cat-muted);
}

.gd-cat-apply {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    margin-top: 17px;
    border: 0;
    border-radius: 8px;
    background: var(--cat-primary);
    color: white;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* Toolbar */

.gd-cat-results {
    min-width: 0;
}

.gd-cat-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    margin-bottom: 16px;
    border: 1px solid var(--cat-border);
    border-radius: 10px;
    background: white;
}

.gd-cat-toolbar-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.gd-cat-toolbar-info strong {
    font-size: 12px;
}

.gd-cat-filter-count {
    padding: 6px 9px;
    border-radius: 5px;
    background: #f8edf2;
    color: #9a4566;
    font-size: 11px;
}

.gd-cat-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gd-cat-toolbar select {
    min-height: 37px;
    max-width: 185px;
    border: 1px solid #e9e0e5;
    border-radius: 7px;
    background: #f8f5f8;
    color: var(--cat-text);
    padding: 7px;
    font-size: 12px;
}

.gd-cat-view-switch {
    display: flex;
    gap: 4px;
}

.gd-cat-view-switch button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #eadfe5;
    border-radius: 6px;
    background: #faf7f8;
    color: #84737b;
    cursor: pointer;
}

.gd-cat-view-switch button.active {
    color: var(--cat-primary);
    background: #f8eaf0;
    border-color: #e5b9ca;
}

.gd-cat-view-switch .material-symbols-rounded {
    font-size: 19px;
}

/* Active filters */

.gd-cat-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.gd-cat-active-filters a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 20px;
    background: #f4e8ed;
    color: #8b3658;
    font-size: 11px;
}

.gd-cat-active-filters .gd-clear-all {
    background: transparent;
    text-decoration: underline;
}

.gd-cat-errors {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #efb6b6;
    border-radius: 8px;
    color: #9b2424;
}

/* Preserve existing product cards */

.gd-catalog-page .gd-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
}

/* List layout changes only the outer grid */

.gd-catalog-page .gd-product-grid.gd-list-view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Pagination */

.gd-cat-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 22px;
    margin-top: 22px;
    border-top: 1px solid var(--cat-border);
}

.gd-cat-pagination p {
    font-size: 12px;
    color: var(--cat-muted);
}

.gd-cat-page-links {
    max-width: 100%;
    overflow-x: auto;
}

/* Empty */

.gd-cat-empty {
    text-align: center;
    padding: 70px 20px;
    background: white;
    border: 1px solid var(--cat-border);
    border-radius: 12px;
}

.gd-cat-empty > span {
    font-size: 45px;
    color: var(--cat-primary);
}

.gd-cat-empty h2 {
    font-size: 22px;
}

.gd-cat-empty p {
    font-size: 13px;
    color: var(--cat-muted);
}

.gd-cat-empty a {
    display: inline-block;
    padding: 11px 20px;
    margin-top: 12px;
    background: var(--cat-primary);
    color: white;
    border-radius: 7px;
}

/* Delivery information */

.gd-cat-delivery {
    margin-top: 40px;
    padding: 28px;
    border: 1px solid #eadce5;
    border-radius: 13px;
    background: linear-gradient(110deg, #eef2ff, #fff2f5);
}

.gd-cat-delivery-heading > span {
    display: inline-block;
    background: var(--cat-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

.gd-cat-delivery-heading h2 {
    font-family: Georgia, serif;
    font-size: 25px;
    margin: 12px 0 7px;
}

.gd-cat-delivery-heading p {
    color: var(--cat-muted);
    font-size: 13px;
}

.gd-cat-delivery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.gd-cat-delivery-grid > div {
    background: #ffffff80;
    padding: 16px;
    border-radius: 10px;
}

.gd-cat-delivery-grid .material-symbols-rounded {
    color: var(--cat-primary);
    font-size: 24px;
}

.gd-cat-delivery-grid h3 {
    font-size: 13px;
    margin: 9px 0 5px;
}

.gd-cat-delivery-grid p {
    color: var(--cat-muted);
    font-size: 12px;
    line-height: 1.6;
}

.gd-cat-mobile-actions {
    display: none;
}

/* Tablet */

@media (max-width: 1150px) {
    .gd-cat-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 14px;
    }

    .gd-catalog-page .gd-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Mobile and small tablet */

@media (max-width: 850px) {
    .gd-cat-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .gd-cat-mobile-actions {
        display: flex;
        margin-bottom: 12px;
    }

    .gd-cat-mobile-actions button {
        display: flex;
        align-items: center;
        gap: 7px;
        padding: 10px 15px;
        border: 1px solid var(--cat-border);
        border-radius: 7px;
        background: white;
        color: var(--cat-primary);
        font-size: 13px;
        font-weight: 700;
    }

    .gd-cat-sidebar {
        display: none;
    }

    .gd-cat-sidebar.is-open {
        display: block;
    }

    .gd-catalog-page .gd-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .gd-catalog-container {
        width: calc(100% - 24px);
    }

    .gd-cat-hero {
        padding: 22px 17px;
        min-height: 185px;
    }

    .gd-cat-hero h1 {
        font-size: 27px;
    }

    .gd-cat-hero-copy {
        max-width: 100%;
    }

    .gd-cat-hero-photo {
        opacity: .12;
        width: 65%;
    }

    .gd-cat-hero-features {
        gap: 8px 12px;
    }

    .gd-cat-hero-art {
        right: -25px;
    }

    .gd-cat-hero-art .material-symbols-rounded {
        font-size: 115px;
    }

    .gd-cat-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .gd-cat-toolbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .gd-cat-toolbar select {
        max-width: 210px;
    }

    .gd-catalog-page .gd-product-grid,
    .gd-catalog-page .gd-product-grid.gd-list-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .gd-cat-delivery {
        padding: 20px 15px;
    }

    .gd-cat-delivery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .gd-cat-delivery-heading h2 {
        font-size: 22px;
    }
}

@media (max-width: 360px) {
    .gd-catalog-page .gd-product-grid {
        gap: 7px;
    }

    .gd-cat-pill {
        font-size: 11px;
        padding: 8px 12px;
    }
}



/* Custom Compact Pagination */

.gd-catalog-page .gd-cat-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    padding: 22px 0;
    margin-top: 25px;
    border-top: 1px solid #eee2e7;
}

.gd-cat-pagination-summary {
    margin: 0;
    color: #8a737d;
    font-size: 12px;
}

.gd-cat-pagination-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 5px;
}

.gd-catalog-page .gd-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #eadfe5;
    border-radius: 7px;
    background: #fff;
    color: #263047;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: .2s;
}

.gd-catalog-page a.gd-page-btn:hover {
    background: #f8eaf0;
    color: var(--cat-primary);
    border-color: var(--cat-primary);
}

.gd-catalog-page .gd-page-btn.active {
    background: var(--cat-primary);
    border-color: var(--cat-primary);
    color: #fff;
}

.gd-catalog-page .gd-page-btn.disabled {
    opacity: .4;
    cursor: not-allowed;
}

.gd-page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    font-size: 13px;
    color: #8a737d;
}

@media (max-width: 600px) {
    .gd-catalog-page .gd-cat-pagination {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }

    .gd-cat-pagination-buttons {
        justify-content: center;
    }

    .gd-catalog-page .gd-page-btn {
        width: 32px;
        height: 32px;
    }
}
