/* =========================================================
   PERSONALISED BAGS — REDESIGN (FULLY RESPONSIVE)
   Palette:  #1C1B1A ink  #FAF7F2 paper  #8B6F4E tan
             #EFE8DD panel  #D6CBB8 hairline  #C0512F stitch-accent
   Type:     'Fraunces' (display)  'Inter' (body/UI)
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --ink: #1C1B1A;
    --paper: #FAF7F2;
    --tan: #8B6F4E;
    --tan-dark: #6E5738;
    --panel: #EFE8DD;
    --line: #D6CBB8;
    --stitch: #C0512F;
    --white: #FFFFFF;
    --display-font: 'Fraunces', serif;
    --body-font: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

/* style.css strips Bootstrap's default .container gutters site-wide,
   so this section supplies its own responsive side padding. */
.product_details .container {
    padding-left: 16px;
    padding-right: 16px;
}

@media (min-width: 768px) {
    .product_details .container {
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media (min-width: 1200px) {
    .product_details .container {
        padding-left: 32px;
        padding-right: 32px;
    }
}

/* ---------- breadcrumb / tab ---------- */
.tab-name {
    margin: 32px 0 12px 0;
    font-family: var(--body-font);
}

.tab-name #tab {
    color: var(--tan);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tab-name span {
    font-family: var(--body-font);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
}

/* ---------- page background ---------- */
.personalised-bag {
    margin-bottom: 30px;
    padding-top: 8px;
}

.personal-bag-content h2 {
    font-family: var(--display-font);
    font-optical-sizing: auto;
    color: var(--ink);
    font-size: 42px;
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.01em;
    margin: 0px 0 8px 0;
    position: relative;
}

.personal-bag-content {
    text-align: center;
    margin-bottom: 56px;
    position: relative;
}

.personal-bag-content::after {
    content: "";
    display: block;
    width: 64px;
    height: 2px;
    background: var(--stitch);
    margin: 18px auto 0 auto;
    background-image: linear-gradient(to right, var(--stitch) 60%, transparent 40%);
    background-size: 10px 2px;
}

/* =========================================================
   FILTER BAG LAYOUT — the core structural fix
   Using flexbox so filter + products sit correctly at
   every breakpoint instead of relying only on Bootstrap
   col classes (which was causing overlap/overflow issues)
========================================================= */
.filter-bag .personal-bag {
    padding: 0 2% 2% 2%;
}

.filter-bag .row.filter-f {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}

/* filter column */
.filter-product {
    width: 100%;
    max-width: 280px;
    flex: 0 0 280px;
    padding-right: 20px;
}

/* product list column */
.personal.list-wrapper {
    flex: 1 1 0%;
    min-width: 0; /* prevents flex overflow */
    width: 100%;
}

.personal.list-wrapper ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.personal.list-wrapper .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

/* =========================================================
   FILTER RAIL — styled like a luggage tag / hang tag
========================================================= */
.filter-content {
    background-color: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
    position: relative;
    position: -webkit-sticky;
    position: sticky;
    top: 24px;
    width: 100%;
}

.filter-content::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1.5px dashed rgba(139, 111, 78, 0.35);
    border-radius: 3px;
    pointer-events: none;
}

.filter h4 {
    font-family: var(--display-font);
    font-size: 21px;
    color: var(--ink);
    font-weight: 600;
    padding: 24px 0 0 22px;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.filter .border {
    border: none;
    border-bottom: 1.5px dashed var(--tan);
    margin: 14px 22px 6px 22px !important;
    padding: 0 !important;
    opacity: 0.6;
}

.accordion {
    --bs-accordion-border-color: none !important;
    --bs-accordion-bg: transparent !important;
    padding: 0 6px 10px 6px;
}

.accordion-item {
    color: var(--ink);
    border-bottom: 1px solid var(--line) !important;
}

.accordion-item:last-child {
    border-bottom: none !important;
}

.accordion-item h2 {
    position: relative;
    font-family: var(--body-font) !important;
    font-size: 15px !important;
    color: var(--ink) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 18px 34px 18px 16px !important;
    margin: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.accordion-item h2:hover {
    color: var(--tan-dark);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
    padding: 0 16px;
}

.accordion-content p {
    padding: 1em 0;
    margin: 0;
}

.accordion-content.active {
    max-height: auto;
}

.accordion-item h2::before {
    content: "+";
    position: absolute;
    right: 16px;
    top: 15px;
    font-size: 20px;
    font-weight: 400;
    color: var(--tan);
    transition: transform 0.25s ease;
}

.accordion-item.active h2::before {
    content: "";
    width: 12px;
    height: 1.5px;
    background: var(--tan);
    top: 24px;
}

/* checkboxes */
.form-check {
    padding-bottom: 12px;
    display: flex;
    align-items: center;
}

.form-check-label {
    font-family: var(--body-font);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink);
    opacity: 0.85;
    cursor: pointer;
}

.form-check-input {
    border: 1.5px solid var(--tan) !important;
    width: 16px;
    height: 16px;
    margin-top: 0;
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(139, 111, 78, 0.15) !important;
}

.form-check-input:checked {
    background-color: var(--stitch) !important;
    border-color: var(--stitch) !important;
}

.filter-product p {
    font-family: var(--body-font);
    color: var(--ink) !important;
    font-size: 14px;
    font-weight: 600 !important;
    margin-bottom: 10px;
}

/* price filter */
.price-input {
    width: 100%;
    display: flex;
    margin-bottom: 20px;
}

.price-input .field {
    margin-top: 20px;
    width: 40%;
    align-items: center;
    text-align: center;
}

.field span {
    font-family: var(--body-font);
    font-size: 11px;
    color: var(--tan-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    height: 32px;
    outline: none;
    font-family: var(--body-font);
    color: var(--ink) !important;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    text-align: center;
    border: 1px solid var(--line);
    background: var(--white);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.price-input .separator {
    width: 20%;
    display: flex;
    font-size: 16px;
    color: var(--tan);
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 6px;
}

.slider {
    top: 6px;
    height: 4px;
    position: relative;
    background: var(--line);
    border-radius: 5px;
}

.slider .progress {
    height: 100%;
    left: 25%;
    right: 25%;
    position: absolute;
    border-radius: 5px;
    background: var(--stitch);
}

.range-input {
    position: relative;
}

.range-input input {
    position: absolute;
    width: 100%;
    height: 4px;
    top: 1px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    border: 2px solid var(--stitch);
    background: var(--white);
    pointer-events: auto;
    -webkit-appearance: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

input[type="range"]::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border: 2px solid var(--stitch);
    border-radius: 50%;
    background: var(--white);
    pointer-events: auto;
    -moz-appearance: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* =========================================================
   PRODUCT CARDS — responsive grid using flex-basis
   3 per row desktop -> 2 per row tablet -> 1 per row mobile
========================================================= */
.filter-bag .card {
    --bs-card-border-width: 0 !important;
    --bs-card-inner-border-radius: 0 !important;
    background: transparent;
    margin-bottom: 34px;
    padding: 0 10px;
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
}

.card-img {
    width: 100%;
    aspect-ratio: 1 / 1.1;
    background-color: var(--panel);
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid var(--line);
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, opacity 0.4s ease;
}

.card-img .card-img-btn {
    position: absolute;
    left: 8%;
    bottom: 8%;
    text-align: center;
    border: none;
    width: 84%;
    padding: 13px 0;
    border-radius: 4px;
    color: var(--white);
    font-weight: 600;
    font-family: var(--body-font);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background-color: #334633;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    display: block;
}

.card-img:hover .card-img-btn {
    opacity: 1;
    transform: translateY(0);
}

.card-img:hover img {
    transform: scale(1.06);
}

.personal .card:hover img {
    transition: transform 0.6s ease;
}

.card-body {
    padding: 16px 2px 0 2px;
}

.card-title {
    font-family: var(--display-font);
    font-size: 17px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-p-text {
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.card-text {
    font-family: var(--body-font);
    font-size: 15px;
    font-weight: 700;
    color: var(--stitch);
    margin: 0;
}

.card-text-undrline {
    font-family: var(--body-font);
    font-size: 13px;
    color: var(--tan);
    text-decoration: line-through;
    opacity: 0.6;
    margin: 0;
}

.card-text-offer {
    font-family: var(--body-font);
    font-size: 12px;
    font-weight: 600;
    color: var(--tan-dark);
    margin: 0;
}

.card-body>span {
    font-family: var(--body-font);
    font-size: 12px;
    color: var(--ink);
    opacity: 0.55;
}

.card-review {
    color: var(--stitch) !important;
    font-size: 11px;
    margin-right: 1px;
}

/* generic btn */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--white);
    border: 1px solid var(--ink);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    color: var(--ink);
    transition: 0.2s ease-in-out;
}

.btn:hover {
    background-color: var(--ink);
    color: var(--white);
}

/* =========================================================
   MODAL — responsive fix (image + content stacking on mobile)
========================================================= */
.modal-dialog {
    max-width: 700px;
    width: 92%;
    margin: 1.75rem auto;
}

.modal-body.d-flex {
    flex-wrap: wrap;
    gap: 20px;
}

.modal-body.d-flex > img {
    width: 260px;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.modal-body-content {
    flex: 1 1 240px;
    min-width: 0;
}

.gift-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gift-wrap img {
    max-width: 60px;
    height: auto;
}

/* =========================================================
   PAGINATION
========================================================= */
.simple-pagination {
    margin-top: 24px;
}

.simple-pagination ul {
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: 0;
}

.simple-pagination li {
    display: flex;
    margin: 0;
}

/* every cell — link OR span — shares one box so the row lines up */
.simple-pagination li a,
.simple-pagination li span {
    box-sizing: border-box;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid var(--line);
    background-color: var(--white);
    border-radius: 6px;
    font-family: var(--body-font);
    font-size: 13px;
    line-height: 1;
    transition: 0.2s ease;
}

.simple-pagination li a:hover {
    border-color: var(--stitch);
    color: var(--stitch);
}

.simple-pagination .current {
    font-weight: 600;
    color: var(--white) !important;
    background-color: #334633 !important;
    border-color: #334633 !important;
}

.simple-pagination .disabled,
.simple-pagination .disabled:hover {
    opacity: 0.45;
    cursor: not-allowed;
    color: var(--ink);
    border-color: var(--line);
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   Desktop (>1200px): filter sidebar + 3 cards per row
   Tablet (768–1199px): filter sidebar + 2 cards per row
   Small tablet (576–767px): filter on top, full width + 2 cards
   Mobile (<576px): filter on top, full width + 1 card per row
========================================================= */

/* ---- Large desktop / laptop ---- */
@media only screen and (max-width: 1199px) {
    .filter-product {
        max-width: 240px;
        flex: 0 0 240px;
    }

    .filter-bag .card {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ---- Tablet ---- */
@media only screen and (min-width: 768px) and (max-width: 991px) {
    .simple-pagination {
        margin-right: 0;
    }

    .accordion {
        margin-bottom: 5%;
    }

    .filter-content {
        position: static;
    }

    .filter-product {
        max-width: 220px;
        flex: 0 0 220px;
    }

    .filter-bag .card {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ---- Small tablet / large phone: stack filter on top ---- */
@media only screen and (min-width: 576px) and (max-width: 767px) {
    .filter-bag .row.filter-f {
        flex-direction: column;
    }

    .filter-product {
        max-width: 100%;
        flex: 1 1 100%;
        padding-right: 0;
        margin-bottom: 24px;
    }

    .filter-content {
        margin: 0 auto;
        position: static;
        max-width: 500px;
    }

    .filter-product p {
        margin-left: 2%;
    }

    .simple-pagination ul {
        justify-content: center;
    }

    .accordion {
        margin-bottom: 5%;
    }

    .filter-bag .card {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .modal-body.d-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .modal-body.d-flex > img {
        width: 100%;
        max-width: 280px;
    }
}

/* ---- Mobile ---- */
@media (max-width: 575px) {
    .filter-bag .row.filter-f {
        flex-direction: column;
    }

    .filter-product {
        max-width: 100%;
        flex: 1 1 100%;
        padding-right: 0;
        margin-bottom: 20px;
    }

    .filter-content {
        margin: 0 auto;
        position: static;
        max-width: 100%;
        width: 92%;
    }

    .filter-product p {
        margin-left: 2%;
    }

    .simple-pagination ul {
        justify-content: center;
        display: flex;
    }

    .accordion {
        margin-bottom: 5%;
    }

    .personal-bag-content h2 {
        font-size: 28px;
    }

    .filter-bag .card {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .card-title {
        font-size: 16px;
    }

    .modal-dialog {
        width: 94%;
        margin: 1rem auto;
    }

    .modal-body.d-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 12px;
    }

    .modal-body.d-flex > img {
        width: 100%;
        max-width: 240px;
    }

    .modal-body-content h5 {
        font-size: 16px;
    }

    .price-input .field {
        width: 45%;
    }
}

/* ---- Extra small phones ---- */
@media (max-width: 400px) {
    .personal-bag-content h2 {
        font-size: 24px;
    }

    .filter h4 {
        font-size: 18px;
    }

    .card-img .card-img-btn {
        font-size: 11px;
        padding: 10px 0;
    }
}