/* ==========================================================================
   SHOP STYLES
   Used by: shop.php, product-detail.php, checkout.php, thank-you.php
   Uses the CSS variables already defined in your main stylesheet.

   Sections:
   1. Shared (product card, buttons)
   2. Shop page
   3. Product detail page
   4. Checkout page
   5. Thank you page
   ========================================================================== */


/* ==========================================================================
   1. SHARED
   ========================================================================== */


/* Product card (shop page + related products) */

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--white-color);
    border: 1px solid var(--divider-color);
    border-radius: 20px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.product-card[hidden] {
    display: none;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(40, 70, 117, 0.12);
}

.product-card-image {
    background: var(--secondary-color);
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    text-align: center;
}

.product-card-body h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.product-card-body .product-subtitle {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    margin-bottom: 14px;
}

.product-card-body .product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
    margin-top: auto;
    /* pushes price + button to the bottom */
    margin-bottom: 16px;
}


/* View Detail button: white bg, coloured border + text. Hover: solid fill, white text */

.btn-view-detail {
    display: block;
    width: 100%;
    padding: 12px 20px;
    font-family: var(--default-font);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    color: var(--primary-color);
    background: var(--white-color);
    border: 2px solid var(--primary-color);
    border-radius: 100px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn-view-detail:hover,
.btn-view-detail:focus-visible {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
}


/* Shared mobile card sizing */

@media (max-width: 575px) {
    .product-card {
        border-radius: 14px;
    }
    .product-card-body {
        padding: 12px;
    }
    .product-card-body h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }
    .product-card-body .product-subtitle {
        font-size: 12px;
        margin-bottom: 10px;
    }
    .product-card-body .product-price {
        font-size: 16px;
        margin-bottom: 12px;
    }
    .btn-view-detail {
        padding: 9px 10px;
        font-size: 13px;
    }
}


/* ==========================================================================
   2. SHOP PAGE (shop.php)
   ========================================================================== */


/* ---------- Search & Filter bar ---------- */

.shop-filter {
    background: var(--white-color);
    border: 1px solid var(--divider-color);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 14px 30px rgba(40, 70, 117, 0.08);
}

.shop-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

.shop-search {
    position: relative;
}

.shop-search svg {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.shop-search input,
.shop-select select {
    width: 100%;
    height: 52px;
    font-family: var(--default-font);
    font-size: 15px;
    color: var(--text-color);
    background: var(--white-color);
    border: 1.5px solid var(--divider-color);
    border-radius: 100px;
    outline: 0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.shop-search input {
    padding: 0 50px 0 52px;
}

.shop-search input::placeholder {
    color: #9aa0ab;
}

.shop-search input::-webkit-search-cancel-button {
    display: none;
}

.shop-search-clear {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    color: var(--primary-color);
    background: var(--secondary-color);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.shop-search-clear.show {
    display: flex;
}

.shop-search-clear:hover {
    background: var(--primary-color);
    color: var(--white-color);
}

.shop-select select {
    padding: 0 46px 0 22px;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23284675' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
}

.shop-search input:focus,
.shop-select select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--divider-color);
}


/* Category pills */

.shop-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--divider-color);
}

.shop-pill {
    padding: 9px 20px;
    font-family: var(--default-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--primary-color);
    background: var(--white-color);
    border: 2px solid var(--primary-color);
    border-radius: 100px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.shop-pill:hover,
.shop-pill:focus-visible,
.shop-pill.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
}


/* Result bar */

.shop-result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
    padding: 0 6px;
    font-size: 15px;
    color: var(--text-color);
}

.shop-result-bar strong {
    color: var(--primary-color);
}

.shop-reset {
    display: none;
    padding: 0;
    font-family: var(--default-font);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-color);
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.shop-reset.show {
    display: inline-block;
}

.shop-reset:hover {
    border-bottom-color: var(--accent-color);
}


/* Empty state */

.shop-empty {
    display: none;
    text-align: center;
    padding: 60px 20px;
    background: var(--white-color);
    border: 1px dashed var(--divider-color);
    border-radius: 24px;
}

.shop-empty.show {
    display: block;
}

.shop-empty svg {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.6;
}

.shop-empty h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.shop-empty p {
    color: var(--text-color);
    margin-bottom: 22px;
}

.shop-empty .btn-view-detail {
    display: inline-block;
    width: auto;
    padding: 12px 32px;
}


/* ---------- Product grid ---------- */

.shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* large screens: 4 per row */
    gap: 30px;
}


/* Tablet: 3 per row */

@media (max-width: 991px) {
    .shop-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    .shop-filter-row {
        grid-template-columns: 1fr 1fr;
    }
    .shop-search {
        grid-column: 1 / -1;
    }
}


/* Mobile: 2 per row */

@media (max-width: 575px) {
    .shop-filter {
        padding: 16px;
        border-radius: 18px;
    }
    .shop-filter-row {
        gap: 10px;
    }
    .shop-search input,
    .shop-select select {
        height: 48px;
        font-size: 14px;
    }
    .shop-select select {
        padding: 0 36px 0 16px;
        background-position: right 14px center;
    }
    /* pills scroll sideways on small screens */
    .shop-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-top: 14px;
        padding-top: 14px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .shop-pills::-webkit-scrollbar {
        display: none;
    }
    .shop-pill {
        padding: 8px 16px;
        font-size: 13px;
    }
    .shop-result-bar {
        font-size: 14px;
        margin-bottom: 18px;
    }
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}


/* ==========================================================================
   3. PRODUCT DETAIL PAGE (product-detail.php)
   ========================================================================== */

.product-detail {
    padding: 150px 0 70px;
    /* top space replaces the page header; adjust to your header height */
}

.product-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 14px;
    color: var(--text-color);
}

.product-breadcrumb a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.product-breadcrumb a:hover {
    color: var(--accent-color);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 60px;
    align-items: start;
}


/* ---------- Gallery ---------- */

.pd-gallery {
    position: sticky;
    top: 110px;
}

.pd-main-image {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--divider-color);
    border-radius: 28px;
    background: var(--secondary-color);
    overflow: hidden;
    cursor: zoom-in;
    aspect-ratio: 1 / 1;
}

.pd-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease-out;
}

.pd-main-image .pd-zoom-hint {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 100px;
    pointer-events: none;
}

.pd-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.pd-thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 16px;
    background: var(--secondary-color);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.3s ease, border-color 0.3s ease;
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pd-thumb:hover {
    opacity: 1;
}

.pd-thumb.active {
    opacity: 1;
    border-color: var(--primary-color);
}


/* ---------- Info ---------- */

.pd-info h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.pd-subtitle {
    font-size: 18px;
    line-height: 1.5;
    color: var(--text-color);
    margin-bottom: 22px;
}

.pd-price-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 18px 0;
    margin-bottom: 22px;
    border-top: 1px solid var(--divider-color);
    border-bottom: 1px solid var(--divider-color);
}

.pd-price {
    font-size: 34px;
    font-weight: 700;
    color: var(--accent-color);
}

.pd-price-note {
    font-size: 14px;
    color: var(--text-color);
}

.pd-description {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-color);
    margin-bottom: 26px;
}

.pd-description p {
    margin-bottom: 12px;
}


/* Highlights */

.pd-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.pd-highlight {
    padding: 16px 12px;
    text-align: center;
    background: var(--secondary-color);
    border: 1px solid var(--divider-color);
    border-radius: 16px;
}

.pd-highlight svg {
    width: 26px;
    height: 26px;
    margin-bottom: 8px;
    stroke: var(--primary-color);
}

.pd-highlight span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--primary-color);
}


/* Buy row */

.pd-buy-row {
    display: flex;
    align-items: stretch;
    gap: 16px;
}

.pd-qty {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    background: var(--white-color);
    border: 2px solid var(--primary-color);
    border-radius: 100px;
    overflow: hidden;
}

.pd-qty button {
    width: 50px;
    height: 100%;
    min-height: 54px;
    border: 0;
    background: transparent;
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
    color: var(--primary-color);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pd-qty button:hover,
.pd-qty button:focus-visible {
    background: var(--primary-color);
    color: var(--white-color);
}

.pd-qty input {
    width: 56px;
    border: 0;
    outline: 0;
    text-align: center;
    font-family: var(--default-font);
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-color);
    background: transparent;
    -moz-appearance: textfield;
}

.pd-qty input::-webkit-outer-spin-button,
.pd-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-buy-now {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 28px;
    font-family: var(--default-font);
    font-size: 17px;
    font-weight: 700;
    color: var(--white-color);
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 100px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn-buy-now:hover,
.btn-buy-now:focus-visible {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--white-color);
}

.pd-total {
    margin-top: 14px;
    font-size: 14px;
    color: var(--text-color);
}

.pd-total strong {
    color: var(--primary-color);
}


/* ---------- Related products (auto slider) ---------- */

.related-products {
    padding: 70px 0 100px;
    background: var(--bg-color);
    overflow: hidden;
}

.related-title {
    text-align: center;
    margin-bottom: 40px;
}

.related-title h2 {
    font-size: 34px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.related-title p {
    color: var(--text-color);
    margin: 0;
}

.related-marquee {
    overflow: hidden;
    padding: 14px 0 22px;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.related-track {
    display: flex;
    width: max-content;
    animation: related-scroll var(--marquee-duration, 40s) linear infinite;
    /* right to left */
}

.related-marquee:hover .related-track,
.related-marquee:focus-within .related-track {
    animation-play-state: paused;
}

@keyframes related-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.related-item {
    flex: 0 0 auto;
    width: 280px;
    margin-right: 26px;
}


/* ---------- Lightbox (multiple view mode) ---------- */

.pd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(18, 30, 52, 0.94);
}

.pd-lightbox.open {
    display: flex;
}

.pd-lb-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
    flex: 1;
    min-height: 0;
}

.pd-lb-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 16px;
    background: var(--secondary-color);
}

.pd-lb-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: var(--primary-color);
    background: var(--white-color);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pd-lb-btn:hover,
.pd-lb-btn:focus-visible {
    background: var(--accent-color);
    color: var(--white-color);
}

.pd-lb-prev {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.pd-lb-next {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.pd-lb-close {
    position: fixed;
    top: 20px;
    right: 20px;
}

.pd-lb-counter {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--white-color);
}

.pd-lb-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    max-width: 100%;
    overflow-x: auto;
    padding: 4px;
}

.pd-lb-thumbs button {
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    opacity: 0.55;
    cursor: pointer;
    transition: opacity 0.3s ease, border-color 0.3s ease;
}

.pd-lb-thumbs button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pd-lb-thumbs button.active {
    opacity: 1;
    border-color: var(--white-color);
}


/* ---------- Product detail responsive ---------- */

@media (max-width: 1199px) {
    .product-detail-grid {
        gap: 40px;
    }
    .pd-info h1 {
        font-size: 34px;
    }
}


/* Tablet */

@media (max-width: 991px) {
    .product-detail {
        padding: 150px 0 50px;
    }
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .pd-gallery {
        position: static;
    }
    .pd-main-image {
        aspect-ratio: 4 / 3;
    }
    .related-item {
        width: 250px;
        margin-right: 22px;
    }
}


/* Mobile */

@media (max-width: 575px) {
    .product-detail {
        padding: 160px 0 40px;
    }
    .product-breadcrumb {
        margin-bottom: 20px;
        font-size: 13px;
    }
    .pd-main-image {
        aspect-ratio: 1 / 1;
        border-radius: 20px;
    }
    .pd-main-image .pd-zoom-hint {
        font-size: 12px;
        padding: 6px 10px;
        right: 10px;
        bottom: 10px;
    }
    .pd-thumbs {
        gap: 8px;
    }
    .pd-thumb {
        border-radius: 12px;
    }
    .pd-info h1 {
        font-size: 26px;
    }
    .pd-subtitle {
        font-size: 16px;
        margin-bottom: 16px;
    }
    .pd-price {
        font-size: 28px;
    }
    .pd-description {
        font-size: 15px;
    }
    .pd-highlights {
        gap: 8px;
    }
    .pd-highlight {
        padding: 12px 6px;
    }
    .pd-highlight span {
        font-size: 11.5px;
    }
    .pd-buy-row {
        flex-direction: column;
    }
    .pd-qty {
        justify-content: space-between;
    }
    .pd-qty button {
        flex: 0 0 25%;
    }
    .pd-qty input {
        flex: 1;
        width: auto;
    }
    .btn-buy-now {
        padding: 15px 20px;
    }
    .related-products {
        padding: 50px 0 70px;
    }
    .related-title h2 {
        font-size: 26px;
    }
    .related-item {
        width: 180px;
        margin-right: 12px;
    }
    .pd-lb-btn {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
    .pd-lb-prev {
        left: 4px;
    }
    .pd-lb-next {
        right: 4px;
    }
    .pd-lb-thumbs button {
        width: 56px;
        height: 56px;
    }
}


/* Respect reduced-motion: no auto slide, allow manual swipe instead */

@media (prefers-reduced-motion: reduce) {
    .related-track {
        animation: none;
    }
    .related-marquee {
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }
}


/* ==========================================================================
   4. CHECKOUT PAGE (checkout.php)
   ========================================================================== */

.checkout-page {
    padding: 150px 0 100px;
    /* top space replaces the page header; adjust to your header height */
}

.checkout-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    color: var(--text-color);
}

.checkout-breadcrumb a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.checkout-breadcrumb a:hover {
    color: var(--accent-color);
}

.checkout-heading {
    font-size: 38px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 34px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 50px;
    align-items: start;
}


/* ---------- Form blocks ---------- */

.co-block {
    background: var(--white-color);
    border: 1px solid var(--divider-color);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 24px;
}

.co-block-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 21px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.co-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    font-size: 15px;
    font-weight: 700;
    color: var(--white-color);
    background: var(--primary-color);
    border-radius: 50%;
}

.co-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.co-field.full {
    grid-column: 1 / -1;
}

.co-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.co-field input,
.co-field select,
.co-field textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--default-font);
    font-size: 15px;
    color: var(--text-color);
    background: var(--white-color);
    border: 1.5px solid var(--divider-color);
    border-radius: 14px;
    outline: 0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.co-field textarea {
    resize: vertical;
    min-height: 100px;
}

.co-field input:focus,
.co-field select:focus,
.co-field textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--divider-color);
}

.co-field input::placeholder,
.co-field textarea::placeholder {
    color: #9aa0ab;
}


/* ---------- Order summary ---------- */

.co-summary {
    position: sticky;
    top: 110px;
    background: var(--secondary-color);
    border: 1px solid var(--divider-color);
    border-radius: 24px;
    padding: 32px;
}

.co-summary-toggle {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    margin-bottom: 20px;
    font-family: var(--default-font);
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--secondary-color);
    border: 1px solid var(--divider-color);
    border-radius: 16px;
    cursor: pointer;
}

.co-summary h2 {
    font-size: 21px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.co-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--divider-color);
}

.co-item-image {
    position: relative;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: var(--white-color);
    border: 1px solid var(--divider-color);
    border-radius: 16px;
}

.co-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 15px;
}

.co-item-qty {
    position: absolute;
    top: -9px;
    right: -9px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--white-color);
    background: var(--primary-color);
    border-radius: 100px;
}

.co-item-info {
    flex: 1;
    min-width: 0;
}

.co-item-info h3 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.co-item-info p {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-color);
    margin: 0;
}

.co-item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.co-coupon {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.co-coupon input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    font-family: var(--default-font);
    font-size: 14px;
    background: var(--white-color);
    border: 1.5px solid var(--divider-color);
    border-radius: 100px;
    outline: 0;
}

.co-coupon input:focus {
    border-color: var(--primary-color);
}

.btn-apply {
    padding: 12px 22px;
    font-family: var(--default-font);
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--white-color);
    border: 2px solid var(--primary-color);
    border-radius: 100px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-apply:hover,
.btn-apply:focus-visible {
    background: var(--primary-color);
    color: var(--white-color);
}

.co-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--text-color);
}

.co-line strong {
    color: var(--primary-color);
}

.co-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding-top: 20px;
    margin-top: 6px;
    margin-bottom: 26px;
    border-top: 1px solid var(--divider-color);
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.co-total span:last-child {
    font-size: 28px;
    color: var(--accent-color);
}

.btn-submit-order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 17px 28px;
    font-family: var(--default-font);
    font-size: 17px;
    font-weight: 700;
    color: var(--white-color);
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 100px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn-submit-order:hover,
.btn-submit-order:focus-visible {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.co-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-color);
}

.co-secure svg {
    stroke: var(--accent-color);
    flex-shrink: 0;
}

.co-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
}

.co-terms input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--primary-color);
}

.co-terms a {
    color: var(--primary-color);
    font-weight: 600;
}


/* ---------- Checkout responsive ---------- */

@media (max-width: 1199px) {
    .checkout-grid {
        gap: 30px;
    }
    .co-block,
    .co-summary {
        padding: 26px;
    }
}


/* Tablet */

@media (max-width: 991px) {
    .checkout-page {
        padding: 150px 0 70px;
    }
    .checkout-heading {
        font-size: 32px;
        margin-bottom: 26px;
    }
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    /* summary moves above the form and becomes collapsible */
    .co-summary-wrap {
        order: -1;
    }
    .co-summary {
        position: static;
    }
    .co-summary-toggle {
        display: flex;
    }
    .co-summary.collapsed {
        display: none;
    }
}


/* Mobile */

@media (max-width: 575px) {
    .checkout-page {
        padding: 160px 0 50px;
    }
    .checkout-heading {
        font-size: 26px;
    }
    .co-block,
    .co-summary {
        padding: 20px;
        border-radius: 18px;
    }
    .co-block-title {
        font-size: 18px;
        margin-bottom: 18px;
    }
    .co-fields {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .co-item-image {
        width: 64px;
        height: 64px;
    }
    .co-item {
        flex-wrap: wrap;
    }
    .co-item-info h3 {
        font-size: 15px;
    }
    .co-coupon {
        flex-direction: column;
    }
    .btn-apply {
        padding: 12px;
    }
    .co-total span:last-child {
        font-size: 24px;
    }
}


/* ==========================================================================
   5. THANK YOU PAGE (thank-you.php)
   ========================================================================== */

.thankyou-page {
    position: relative;
    padding: 150px 0 100px;
    /* top space replaces the page header; adjust to your header height */
    overflow: hidden;
}


/* soft decorative background shapes */

.thankyou-page::before,
.thankyou-page::after {
    content: "";
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
}

.thankyou-page::before {
    top: 60px;
    left: -120px;
    width: 320px;
    height: 320px;
    background: var(--secondary-color);
}

.thankyou-page::after {
    bottom: 40px;
    right: -140px;
    width: 380px;
    height: 380px;
    background: var(--bg-color);
}

.thankyou-page .container {
    position: relative;
    z-index: 1;
}


/* ---------- Hero ---------- */

.ty-hero {
    max-width: 760px;
    margin: 0 auto 50px;
    text-align: center;
}

.ty-check {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 14px auto 28px;
}

.ty-check::before {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.12;
    animation: ty-pulse 2.4s ease-out infinite;
}

.ty-check-circle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--accent-color);
    border-radius: 50%;
    animation: ty-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.ty-check-circle svg {
    width: 54px;
    height: 54px;
    fill: none;
    stroke: var(--white-color);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: ty-draw 0.6s 0.45s ease forwards;
}

@keyframes ty-pop {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

@keyframes ty-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes ty-pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.25;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

.ty-label {
    display: inline-block;
    padding: 7px 18px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-color);
    background: var(--white-color);
    border: 1px solid var(--divider-color);
    border-radius: 100px;
}

.ty-hero h1 {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.ty-hero p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-color);
    margin: 0;
}

.ty-hero p strong {
    color: var(--primary-color);
}


/* ---------- Order meta strip ---------- */

.ty-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--white-color);
    border: 1px solid var(--divider-color);
    border-radius: 24px;
    margin-bottom: 30px;
    box-shadow: 0 14px 30px rgba(40, 70, 117, 0.08);
}

.ty-meta-item {
    padding: 26px 24px;
    text-align: center;
    border-right: 1px solid var(--divider-color);
}

.ty-meta-item:last-child {
    border-right: 0;
}

.ty-meta-item span {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

.ty-meta-item strong {
    display: block;
    font-size: 17px;
    line-height: 1.35;
    color: var(--primary-color);
    word-break: break-word;
}

.ty-meta-item.highlight strong {
    color: var(--accent-color);
}


/* ---------- Two column area ---------- */

.ty-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.ty-card {
    background: var(--white-color);
    border: 1px solid var(--divider-color);
    border-radius: 24px;
    padding: 32px;
}

.ty-card h2 {
    font-size: 21px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 24px;
}


/* Items */

.ty-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--divider-color);
}

.ty-item-image {
    position: relative;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: var(--secondary-color);
    border: 1px solid var(--divider-color);
    border-radius: 16px;
}

.ty-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 15px;
}

.ty-item-qty {
    position: absolute;
    top: -9px;
    right: -9px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--white-color);
    background: var(--primary-color);
    border-radius: 100px;
}

.ty-item-info {
    flex: 1;
    min-width: 0;
}

.ty-item-info h3 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.ty-item-info p {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-color);
    margin: 0;
}

.ty-item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.ty-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--text-color);
}

.ty-line strong {
    color: var(--primary-color);
}

.ty-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding-top: 20px;
    margin-top: 6px;
    border-top: 1px solid var(--divider-color);
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.ty-total span:last-child {
    font-size: 28px;
    color: var(--accent-color);
}


/* Steps */

.ty-steps {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ty-step {
    position: relative;
    display: flex;
    gap: 18px;
    padding-bottom: 28px;
}

.ty-step:last-child {
    padding-bottom: 0;
}


/* connecting line */

.ty-step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 42px;
    bottom: 4px;
    left: 20px;
    width: 2px;
    background: var(--divider-color);
}

.ty-step-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 15px;
    font-weight: 700;
    color: var(--white-color);
    background: var(--primary-color);
    border-radius: 50%;
}

.ty-step.done .ty-step-icon {
    background: var(--accent-color);
}

.ty-step-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--white-color);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ty-step-text h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 2px 0 4px;
}

.ty-step-text p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}


/* ---------- Button ---------- */

.ty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 44px;
}

.btn-ty-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 34px;
    font-family: var(--default-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    color: var(--white-color);
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 100px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn-ty-primary:hover,
.btn-ty-primary:focus-visible {
    color: var(--white-color);
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.ty-help {
    margin-top: 26px;
    text-align: center;
    font-size: 14px;
    color: var(--text-color);
}

.ty-help a {
    font-weight: 700;
    color: var(--primary-color);
}

.ty-help a:hover {
    color: var(--accent-color);
}


/* ---------- Thank you responsive ---------- */

@media (max-width: 1199px) {
    .ty-card {
        padding: 26px;
    }
}


/* Tablet */

@media (max-width: 991px) {
    .thankyou-page {
        padding: 150px 0 70px;
    }
    .ty-hero h1 {
        font-size: 36px;
    }
    .ty-grid {
        grid-template-columns: 1fr;
    }
}


/* Mobile */

@media (max-width: 575px) {
    .thankyou-page {
        padding: 160px 0 50px;
    }
    .ty-check {
        width: 90px;
        height: 90px;
        margin: 14px auto 28px;
    }
    .ty-check-circle svg {
        width: 44px;
        height: 44px;
    }
    .ty-hero {
        margin-bottom: 34px;
    }
    .ty-hero h1 {
        font-size: 28px;
    }
    .ty-hero p {
        font-size: 15px;
    }
    /* meta strip stacks into rows */
    .ty-meta {
        grid-template-columns: 1fr;
        border-radius: 18px;
    }
    .ty-meta-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 16px 18px;
        text-align: left;
        border-right: 0;
        border-bottom: 1px solid var(--divider-color);
    }
    .ty-meta-item:last-child {
        border-bottom: 0;
    }
    .ty-meta-item span {
        margin-bottom: 0;
        font-size: 13px;
    }
    .ty-meta-item strong {
        font-size: 15px;
        text-align: right;
    }
    .ty-card {
        padding: 20px;
        border-radius: 18px;
    }
    .ty-card h2 {
        font-size: 18px;
        margin-bottom: 18px;
    }
    .ty-item-image {
        width: 64px;
        height: 64px;
    }
    .ty-item-info h3 {
        font-size: 15px;
    }
    .ty-total span:last-child {
        font-size: 24px;
    }
    .ty-actions {
        flex-direction: column;
        margin-top: 32px;
    }
    .btn-ty-primary {
        width: 100%;
    }
}


/* Respect reduced-motion */

@media (prefers-reduced-motion: reduce) {
    .ty-check::before {
        animation: none;
    }
    .ty-check-circle {
        animation: none;
    }
    .ty-check-circle svg {
        animation: none;
        stroke-dashoffset: 0;
    }
}