/*
 * custom.css — site-specific overrides and additions.
 * Loaded last so these rules win over the theme styles.
 * Do NOT edit style.css directly — put all customisations here.
 */

/* ------------------------------------------------------------------
   Cart icon — theme hides .cart-btn below 1200px; override so it
   stays visible on mobile and tablet alongside the hamburger.
------------------------------------------------------------------ */
@media (max-width: 1199.98px) {
    .main-header .cart-btn {
        display: inline-flex !important;
        align-items: center;
        margin-right: 12px;
    }
}

/* ------------------------------------------------------------------
   Product section — raise stacking context so the absolutely
   positioned bg-image from .features-section cannot float over it.
------------------------------------------------------------------ */
.product-section {
    z-index: 2;
}

/* ------------------------------------------------------------------
   Product cards — enforce a consistent 1:1 square image box so all
   cards in a row are the same height regardless of the source image.
   Old site images were square thumbnails, so 1:1 matches exactly.
   object-fit: cover fills the box cleanly for any future upload size.
------------------------------------------------------------------ */
.product-block.home-style .inner-box .image-box .inner {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 square — change to e.g. 125% for portrait */
}

.product-block.home-style .inner-box .image-box .inner figure.image {
    position: absolute;
    inset: 0;
    margin: 0;
}

.product-block.home-style .inner-box .image-box .inner figure.image a {
    display: block;
    height: 100%;
}

.product-block.home-style .inner-box .image-box .inner figure.image a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* ------------------------------------------------------------------
   Contact form — theme default inputs use white text + near-invisible
   white border, designed for dark backgrounds. Override for the light
   contact-details section so fields are actually visible.
------------------------------------------------------------------ */
.contact-details .contact-form input:not([type=submit]):not([type=hidden]),
.contact-details .contact-form textarea {
    color: #333;
    border-bottom: 1px solid #bbb;
}

.contact-details .contact-form input:not([type=submit]):not([type=hidden])::placeholder,
.contact-details .contact-form textarea::placeholder {
    color: #999;
    opacity: 1;
}

.contact-details .contact-form input:not([type=submit]):not([type=hidden]):focus,
.contact-details .contact-form textarea:focus {
    border-bottom-color: #333;
    outline: none;
}

/* ------------------------------------------------------------------
   Terms page — spacing between each T&C section block.
   Content is stored in DB and output as .terms-block divs.
------------------------------------------------------------------ */
.terms-section {
    padding: 80px 0;
}

.terms-section .sec-title {
    margin-bottom: 40px;
}

.terms-block {
    margin-bottom: 36px;
}

.terms-block h5 {
    margin-bottom: 10px;
}

.terms-published {
    margin-top: 48px;
    font-size: 0.875rem;
    color: #999;
}

/* ------------------------------------------------------------------
   Shop page — sidebar + grid layout
------------------------------------------------------------------ */
.shop-section {
    padding: 80px 0;
}

.shop-sidebar {
    padding-right: 20px;
}

.shop-sidebar .sidebar-widget {
    padding: 20px;
    margin-bottom: 16px;
}

/* Accordion: widget title is clickable */
.shop-sidebar .widget-title {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop-sidebar .widget-title h5 {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: none;
    flex: 1;
}

/* The chevron arrow on each widget title */
.shop-sidebar .widget-chevron {
    font-size: 0.7rem;
    color: #aaa;
    padding-bottom: 10px;
    transition: transform 0.25s ease;
    display: inline-block;
}

.shop-sidebar .widget-chevron::before {
    content: '▾';
}

/* Rule under the whole title row */
.shop-sidebar .widget-title {
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 16px;
}

/* Collapsed state */
.shop-sidebar .sidebar-widget.collapsed .widget-body {
    display: none;
}

.shop-sidebar .sidebar-widget.collapsed .widget-chevron {
    transform: rotate(-90deg);
}

/* Mobile: sidebar padding reset (show/hide is handled by JS) */
@media (max-width: 991px) {
    #shop-sidebar {
        margin-top: 8px;
    }

    .shop-sidebar {
        padding-right: 0;
    }
}

/* Mobile filter toggle button */
.shop-filter-bar {
    margin-bottom: 20px;
}

.shop-filter-bar button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
}

.shop-filter-bar button #shop-filter-chevron {
    font-size: 0.75rem;
    color: #aaa;
    transition: transform 0.25s ease;
}

/* Red dot on filter button when filters are active */
.filter-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--theme-color, #c89b6e);
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 4px;
}

.shop-sidebar .category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shop-sidebar .category-list li {
    margin-bottom: 8px;
}

.shop-sidebar .category-list li a {
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.shop-sidebar .category-list li a:hover,
.shop-sidebar .category-list li.active a {
    color: var(--theme-color, #c89b6e);
    font-weight: 600;
}

.shop-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.shop-result-count {
    display: inline-block;
    background: var(--theme-color, #c89b6e);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Search box */
.shop-search-box {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.shop-search-box input[type="text"] {
    flex: 1;
    border: none;
    padding: 8px 12px;
    font-size: 0.875rem;
    color: #333;
    outline: none;
    background: #fff;
}

.shop-search-box input[type="text"]::placeholder {
    color: #aaa;
}

.shop-search-box button {
    border: none;
    background: var(--theme-color, #c89b6e);
    color: #fff;
    padding: 0 14px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: opacity 0.2s;
}

.shop-search-box button:hover {
    opacity: 0.85;
}

/* Size select */
#shop-size-select {
    width: 100%;
    margin-top: 14px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #333;
    background: #fff;
    cursor: pointer;
    outline: none;
    appearance: auto;
}

/* Price range */
.shop-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.shop-price-inputs input[type="number"] {
    width: 80px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 0.875rem;
    color: #333;
    outline: none;
    -moz-appearance: textfield;
}

.shop-price-inputs input[type="number"]::-webkit-outer-spin-button,
.shop-price-inputs input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.shop-price-inputs input[type="number"]:focus {
    border-color: var(--theme-color, #c89b6e);
}

.shop-price-inputs span {
    color: #aaa;
    font-size: 0.9rem;
}

.shop-price-apply {
    border: 1px solid var(--theme-color, #c89b6e);
    background: transparent;
    color: var(--theme-color, #c89b6e);
    padding: 5px 16px;
    border-radius: 4px;
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.shop-price-apply:hover {
    background: var(--theme-color, #c89b6e);
    color: #fff;
}

/* Active filter toolbar */
.shop-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter-clear-all {
    font-size: 0.8rem;
    color: #999;
    text-decoration: underline;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.825rem;
    color: #444;
}

.filter-tag a {
    color: #999;
    text-decoration: none;
    font-weight: 700;
    line-height: 1;
}

.filter-tag a:hover {
    color: #333;
}

.shop-empty {
    text-align: center;
    padding: 60px 0;
    color: #999;
}

.shop-empty p {
    margin-bottom: 20px;
}

/* Pagination */
.shop-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 40px 0 10px;
    flex-wrap: wrap;
}

.shop-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #444;
    background: #fff;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.shop-page-btn:hover {
    background: var(--theme-color, #c89b6e);
    color: #fff;
    border-color: var(--theme-color, #c89b6e);
}

.shop-page-btn.active {
    background: var(--theme-color, #c89b6e);
    color: #fff;
    border-color: var(--theme-color, #c89b6e);
    pointer-events: none;
}

.shop-page-ellipsis {
    color: #aaa;
    padding: 0 4px;
}

/* ------------------------------------------------------------------
   Features (pre-order) section — clip the absolutely positioned
   bg-image so it cannot overflow into the footer below it.
   min-height matches the bg-image height (600px) so the section
   is always tall enough to show the full image.
------------------------------------------------------------------ */
.features-section {
    overflow: hidden;
    min-height: 600px;
    margin-bottom: 80px;
}

/* ------------------------------------------------------------------
   Product detail page — image gallery
------------------------------------------------------------------ */
.product-detail-gallery .main-image-box {
    margin-bottom: 12px;
}

.product-detail-gallery .main-image-box a {
    display: block;
}

.product-detail-gallery .main-image-box img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    cursor: zoom-in;
}

/* Thumbnail strip */
.product-thumbnails {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.product-thumb-item {
    width: 72px;
    height: 72px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.product-thumb-item.active,
.product-thumb-item:hover {
    border-color: var(--theme-color, #c89b6e);
    opacity: 1;
}

.product-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Colour variant chips */
.product-colour-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.colour-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #444;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

a.colour-chip:hover {
    border-color: var(--theme-color, #c89b6e);
    color: var(--theme-color, #c89b6e);
}

.colour-chip.active {
    border-color: var(--theme-color, #c89b6e);
    background: var(--theme-color, #c89b6e);
    color: #fff;
    cursor: default;
    pointer-events: none;
}

.product-details__title span {
    display: block;
    font-size: 1.5rem;
    color: var(--theme-color, #c89b6e);
    margin-top: 8px;
    font-weight: 600;
}

.product-details .product-details__quantity {
    margin-top: 20px;
}

.product-details__quantity-title {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.quantity-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-box input[type="number"] {
    width: 64px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 1rem;
    -moz-appearance: textfield;
    outline: none;
}

.quantity-box input[type="number"]::-webkit-outer-spin-button,
.quantity-box input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.quantity-box .add,
.quantity-box .sub {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--theme-color, #c89b6e);
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quantity-box .add:hover,
.quantity-box .sub:hover {
    opacity: 0.85;
}

#size_list {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
    background: #fff;
    cursor: pointer;
    outline: none;
    appearance: auto;
}

#size_list:focus {
    border-color: var(--theme-color, #c89b6e);
}

.product-details__pre-order-notice {
    font-size: 0.85rem;
    color: #888;
    margin-top: 16px;
    line-height: 1.6;
}

.product-details__meta {
    margin-top: 16px;
    font-size: 0.875rem;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: center;
}

.product-meta-label {
    font-weight: 600;
    color: #444;
}

.product-meta-link {
    color: var(--theme-color, #c89b6e);
    text-decoration: none;
}

.product-meta-link:hover {
    text-decoration: underline;
}

.product-details__buttons {
    margin-top: 24px;
}

.product-size-guide-img {
    max-width: 100%;
    border-radius: 4px;
    cursor: zoom-in;
}

.related-product {
    background: #fafafa;
    padding: 60px 0;
}

.related-product h3 {
    margin-bottom: 28px;
    font-size: 1.4rem;
}

/* ------------------------------------------------------------------
   Cart page
------------------------------------------------------------------ */
.cart-section {
    padding: 60px 0;
}

.cart-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cart-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.cart-table th,
.cart-table td {
    padding: 14px 10px;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

.cart-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #888;
}

.cart-img-cell {
    width: 90px;
}

.cart-product-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.cart-product-name {
    font-weight: 500;
    color: inherit;
    text-decoration: none;
}

.cart-product-name:hover {
    color: var(--theme-color, #c89b6e);
}

.cart-update-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-qty-input {
    width: 54px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 6px;
    font-size: 0.875rem;
    -moz-appearance: textfield;
    outline: none;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.btn-cart-update {
    background: none;
    border: 1px solid var(--theme-color, #c89b6e);
    color: var(--theme-color, #c89b6e);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.78rem;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.btn-cart-update:hover {
    background: var(--theme-color, #c89b6e);
    color: #fff;
}

.btn-cart-remove {
    background: none;
    border: none;
    color: #bbb;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s;
}

.btn-cart-remove:hover {
    color: #c00;
}

.cart-totals-box {
    background: #faf8f5;
    border: 1px solid #ede8e0;
    border-radius: 8px;
    padding: 28px;
    position: sticky;
    top: 120px;
}

.cart-totals-box h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.cart-continue-link {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 0.88rem;
    color: #888;
    text-decoration: underline;
}

.cart-continue-link:hover {
    color: #555;
}

.cart-empty {
    text-align: center;
    padding: 80px 20px;
}

.cart-empty p {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 28px;
}

/* ------------------------------------------------------------------
   Cart — mobile stacked card layout (< 768px)
   Each table row becomes a card: image left, details stacked right.
------------------------------------------------------------------ */
@media (max-width: 767px) {
    /* Kill the horizontal scroll wrapper — not needed in card mode */
    .cart-table-wrapper { overflow: visible; }
    .cart-table { min-width: 0; }

    /* Hide column headers */
    .cart-table thead { display: none; }

    /* Turn each row into a flex card */
    .cart-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        position: relative;
        padding: 16px 0;
        border-bottom: 1px solid #e8e8e8;
    }

    .cart-table td {
        border: none;
        padding: 0;
    }

    /* Image — fixed-width left column */
    .cart-img-cell {
        width: 80px;
        flex-shrink: 0;
        padding-right: 12px !important;
    }

    .cart-img-cell .cart-product-img {
        width: 68px;
        height: 68px;
    }

    /* Product name — fills remaining width, right-padded for × button */
    .cart-name-cell {
        flex: 1;
        min-width: 0;
        padding-right: 36px !important;
        padding-bottom: 5px !important;
        font-weight: 500;
    }

    /* Remove button — pinned top-right of the card */
    .cart-remove-cell {
        position: absolute;
        top: 16px;
        right: 0;
    }

    /* Size, qty, price, total — full-width rows, indented under image */
    .cart-size-cell,
    .cart-qty-cell,
    .cart-price-cell,
    .cart-line-total {
        width: 100%;
        margin-left: 80px;
        padding: 3px 0 !important;
    }

    .cart-size-cell  { font-size: 0.82rem; color: #888; }
    .cart-price-cell { font-size: 0.82rem; color: #aaa; } /* de-emphasised — total is below */
    .cart-line-total { font-weight: 600; color: var(--theme-color, #c89b6e); }

    /* Order summary stacks full-width below the table on mobile */
    .cart-totals-box {
        position: static;
        margin-top: 24px;
    }
}

/* ============================================================
   CHECKOUT PAGE
   ============================================================ */

.checkout-section { padding: 60px 0 80px; }

.checkout-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 28px;
    padding-bottom: 14px;
    border-bottom: 1px solid #ede8e0;
}

/* Form inputs — underline style matching site aesthetic */
.checkout-form label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
    margin-bottom: 6px;
}
.checkout-form label .req { color: var(--theme-color, #c89b6e); }
.checkout-form label .optional { font-weight: 400; text-transform: none; font-size: 0.78rem; }

.checkout-input {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #d0c8be;
    background: transparent;
    font-size: 0.95rem;
    color: #333;
    border-radius: 0;
    outline: none;
    transition: border-color .2s;
    box-shadow: none;
}
.checkout-input:focus {
    border-bottom-color: var(--theme-color, #c89b6e);
    box-shadow: none;
}
.checkout-input::placeholder { color: #ccc; }
textarea.checkout-input { resize: vertical; min-height: 80px; }

/* Inline field validation errors */
.checkout-input-error {
    border-bottom-color: #c0392b !important;
}
.co-field-error {
    display: block;
    font-size: 0.78rem;
    color: #c0392b;
    margin-top: 4px;
}
.co-field-error--terms {
    margin-top: 6px;
    display: block;
}

/* Province select — custom arrow */
.checkout-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    padding-right: 22px;
}

/* Flash error */
.checkout-error-alert {
    background: #fff5f5;
    border: 1px solid #f5c6c6;
    border-radius: 6px;
    color: #c00;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

/* T&C checkbox */
.checkout-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 8px 0 24px;
}
.checkout-terms input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--theme-color, #c89b6e);
    cursor: pointer;
}
.checkout-terms label {
    font-size: 0.88rem;
    color: #666;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}
.checkout-terms label a { color: var(--theme-color, #c89b6e); }

/* ── Order summary box ────────────────────────── */
.checkout-order-box {
    background: #faf8f5;
    border: 1px solid #ede8e0;
    border-radius: 10px;
    padding: 28px;
}
.checkout-order-box h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #ede8e0;
}

/* Cart item rows in summary */
.co-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #ede8e0;
}
.co-item-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}
.co-item-name {
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.4;
    color: #444;
}
.co-item-size {
    display: inline-block;
    font-size: 0.75rem;
    background: #ede8e0;
    border-radius: 3px;
    padding: 1px 6px;
    margin-left: 4px;
    color: #666;
}
.co-item-qty {
    font-size: 0.82rem;
    color: #999;
    margin-left: 4px;
}
.co-item-price {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    color: #333;
}

/* Totals */
.co-totals { margin-top: 18px; }
.co-total-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 0.93rem;
    color: #666;
}
.co-total-row.grand {
    font-weight: 700;
    font-size: 1.05rem;
    color: #222;
    border-top: 2px solid var(--theme-color, #c89b6e);
    margin-top: 10px;
    padding-top: 14px;
}

/* Secure note + back link */
.co-secure-note {
    text-align: center;
    font-size: 0.8rem;
    color: #aaa;
    margin: 14px 0 6px;
}
.co-secure-note .fa { margin-right: 4px; }
.co-back-link {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: #aaa;
    text-decoration: underline;
    margin-top: 8px;
}
.co-back-link:hover { color: #666; }

/* Sticky summary — desktop */
@media (min-width: 992px) {
    .checkout-order-sticky { position: sticky; top: 100px; }
}

/* ── Order success page ────────────────────────── */
.order-success-section,
.order-cancel-section { padding: 60px 0 80px; }

.order-success-box,
.order-cancel-box {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    background: #faf8f5;
    border: 1px solid #ede8e0;
    border-radius: 10px;
    padding: 50px 40px;
}

.order-success-icon { font-size: 3.5rem; color: #5cb85c; margin-bottom: 20px; }
.order-cancel-icon  { font-size: 3.5rem; color: #d9534f; margin-bottom: 20px; }

.order-success-heading { font-size: 1.6rem; margin-bottom: 12px; }
.order-success-sub {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Order item rows on success page */
.order-success-summary {
    text-align: left;
    background: #fff;
    border: 1px solid #ede8e0;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 30px;
}
.order-success-summary h4 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 14px;
}
.oi-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid #f0ebe4;
    font-size: 0.9rem;
}
.oi-row:last-of-type { border-bottom: none; }
.oi-name { flex: 1; color: #444; }
.oi-size {
    display: inline-block;
    font-size: 0.75rem;
    background: #ede8e0;
    border-radius: 3px;
    padding: 1px 6px;
    margin: 0 4px;
    color: #666;
}
.oi-qty { color: #999; font-size: 0.82rem; }
.oi-price { font-weight: 500; color: #333; white-space: nowrap; }

.oi-totals { margin-top: 12px; border-top: 1px solid #ede8e0; padding-top: 10px; }
.oi-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
    padding: 4px 0;
}
.oi-total-row.grand {
    font-weight: 700;
    font-size: 1rem;
    color: #222;
    border-top: 2px solid var(--theme-color, #c89b6e);
    margin-top: 6px;
    padding-top: 10px;
}

.order-success-actions,
.order-cancel-actions { margin-top: 10px; }

/* ===========================
   Social Share Buttons
   =========================== */
.product-share {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    flex-wrap: wrap;
}
.product-share__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 2px;
}
.product-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    line-height: 1;
}
.product-share__btn:hover { opacity: 0.85; transform: scale(1.08); color: #fff; }
.product-share__btn--wa   { background: #25d366; }
.product-share__btn--fb   { background: #1877f2; }
.product-share__btn--x    { background: #000; }
.product-share__btn--copy { background: #888; }
.product-share__copied {
    font-size: 0.78rem;
    color: #25d366;
    font-weight: 600;
}

/* ===========================
   Card Actions (share/wishlist on product cards)
   =========================== */
.card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}
.card-share-btn,
.card-wish-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e0d8d0;
    background: transparent;
    color: #999;
    font-size: 0.78rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    line-height: 1;
    padding: 0;
}
.card-share-btn:hover { color: var(--theme-color, #c89b6e); border-color: var(--theme-color, #c89b6e); }
.card-wish-btn:hover,
.card-wish-btn.wished { color: #e74c3c; border-color: #e74c3c; }
.card-wish-btn.wished i.far { display: none; }
.card-wish-btn.wished i.fas { display: inline; }
.card-wish-btn i.fas { display: none; }

/* Card star ratings */
.card-stars { font-size: 0.72rem; color: #f4a01e; margin: 4px 0 6px; display: flex; align-items: center; gap: 1px; }
.card-stars .far.fa-star { color: #ddd; }
.card-review-count { color: #999; font-size: 0.75rem; margin-left: 4px; }

/* Card share popover */
.card-share-popover {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e8e0d8;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    display: flex;
    gap: 6px;
    padding: 8px 10px;
}
.card-share-popover[hidden] { display: none; }
.csp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    line-height: 1;
}
.csp-btn:hover { opacity: 0.85; transform: scale(1.1); color: #fff; }
.csp-wa   { background: #25d366; }
.csp-fb   { background: #1877f2; }
.csp-x    { background: #000; }
.csp-copy { background: #888; }

/* ===========================
   Recently Viewed Section
   =========================== */
.recently-viewed-section[hidden] { display: none; }

/* ===========================
   Order Lookup Page
   =========================== */
.order-lookup-section { padding: 60px 0 80px; }
.order-lookup-box {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 24px rgba(0,0,0,0.07);
    padding: 44px 40px;
}
.order-lookup-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
}
.order-lookup-sub { color: #666; margin-bottom: 28px; }

.order-lookup-field {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.order-lookup-input {
    flex: 1 1 260px;
    padding: 12px 16px;
    border: 1px solid #d4ccc4;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.order-lookup-input:focus { border-color: var(--theme-color, #c89b6e); }
.order-lookup-input-error { border-color: #c0392b; }
.order-lookup-error { color: #c0392b; font-size: 0.85rem; margin-top: 8px; }
.order-lookup-submit { flex-shrink: 0; margin: 0 !important; }

.order-lookup-results { margin-top: 36px; border-top: 1px solid #ede8e0; padding-top: 28px; }
.order-lookup-none, .order-lookup-found { color: #555; }
.order-lookup-none-hint { color: #999; font-size: 0.88rem; margin-top: 4px; }
.order-lookup-help { color: #999; font-size: 0.88rem; margin-top: 16px; }

.order-lookup-table-wrap { overflow-x: auto; margin-top: 16px; }
.order-lookup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.order-lookup-table th {
    text-align: left;
    padding: 10px 12px;
    background: #f8f5f1;
    color: #555;
    font-weight: 600;
    border-bottom: 2px solid #ede8e0;
    white-space: nowrap;
}
.order-lookup-table td {
    padding: 12px 12px;
    border-bottom: 1px solid #f0ebe4;
    color: #333;
    vertical-align: middle;
}
.order-lookup-table tbody tr:last-child td { border-bottom: none; }

.order-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    background: #f0ebe4;
    color: #666;
}
.order-status-paid,
.order-status-complete              { background: #e8f5e9; color: #2e7d32; }
.order-status-shipped               { background: #e3f2fd; color: #1565c0; }
.order-status-delivered             { background: #e0f2f1; color: #00695c; }
.order-status-processing            { background: #fff8e1; color: #f57f17; }
.order-status-packed                { background: #f3e5f5; color: #6a1b9a; }
.order-status-cancelled             { background: #fce4ec; color: #c62828; }
.order-status-refunded              { background: #ede7f6; color: #4527a0; }
.order-status-pending,
.order-status-awaiting_confirmation { background: #fff3e0; color: #e65100; }
.order-lookup-table-wrap            { overflow-x: auto; }

@media (max-width: 600px) {
    .order-lookup-box { padding: 28px 18px; }
    .order-lookup-field { flex-direction: column; }
    .order-lookup-submit { width: 100%; }
}

/* ===========================
   Product Detail Wishlist Button
   =========================== */
.product-wish-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e0d8d0;
    background: transparent;
    color: #999;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    transition: color 0.2s, border-color 0.2s, transform 0.2s;
    vertical-align: middle;
    padding: 0;
    line-height: 1;
}
.product-wish-btn:hover,
.product-wish-btn.wished { color: #e74c3c; border-color: #e74c3c; }
.product-wish-btn i.fas { display: none; }
.product-wish-btn.wished i.far { display: none; }
.product-wish-btn.wished i.fas { display: inline; }

/* ===========================
   Wishlist Page
   =========================== */
.wishlist-section { padding: 50px 0 80px; }
.wishlist-empty {
    text-align: center;
    padding: 70px 20px;
    color: #888;
}
.wishlist-empty-icon { font-size: 3.5rem; color: #e0d0c8; display: block; margin-bottom: 18px; }
.wishlist-empty h3 { font-size: 1.4rem; color: #444; margin-bottom: 10px; }
.wishlist-empty p { margin-bottom: 24px; }
.wishlist-empty[hidden] { display: none; }
#wishlist-grid[hidden] { display: none; }
.wishlist-actions { text-align: right; margin-top: 20px; }
.wishlist-actions[hidden] { display: none; }
.wishlist-clear-btn {
    background: none;
    border: 1px solid #ccc;
    color: #999;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.84rem;
    transition: color 0.2s, border-color 0.2s;
}
.wishlist-clear-btn:hover { color: #c0392b; border-color: #c0392b; }

/* ===========================
   Product Reviews
   =========================== */
.reviews-section { background: #faf8f5; padding: 50px 0; }
.reviews-header { margin-bottom: 24px; }
.reviews-title { font-size: 1.3rem; font-weight: 700; color: #222; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.reviews-avg { font-size: 0.9rem; font-weight: 400; color: #888; display: flex; align-items: center; gap: 4px; }
.reviews-avg .fas.fa-star { color: #f4a01e; }
.reviews-avg .far.fa-star { color: #ddd; }

.review-success-msg { background: #e8f5e9; color: #2e7d32; padding: 12px 18px; border-radius: 6px; margin-bottom: 20px; font-weight: 500; }

.reviews-list { margin-bottom: 36px; }
.review-item { background: #fff; border-radius: 8px; padding: 20px 22px; margin-bottom: 14px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.review-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.review-author { font-weight: 700; color: #333; }
.review-stars .fas.fa-star { color: #f4a01e; font-size: 0.82rem; }
.review-stars .far.fa-star { color: #ddd; font-size: 0.82rem; }
.review-date { color: #bbb; font-size: 0.78rem; margin-left: auto; }
.review-text { color: #555; margin: 0; font-size: 0.92rem; line-height: 1.6; }

.review-form-wrap { background: #fff; border-radius: 8px; padding: 28px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.review-gate { font-size: 0.9rem; color: #888; padding: 14px 0; margin: 0; }
.review-gate a { color: #c89b6e; text-decoration: underline; }
.review-form-heading { font-size: 1.1rem; font-weight: 700; color: #333; margin-bottom: 18px; }
.review-errors { background: #fce4ec; color: #c62828; padding: 12px 16px; border-radius: 6px; margin-bottom: 14px; font-size: 0.88rem; }
.review-errors p { margin: 0 0 4px; }
.review-errors p:last-child { margin: 0; }

/* CSS-only star rating input */
.review-stars-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; margin-bottom: 16px; }
.review-stars-input input[type="radio"] { display: none; }
.review-stars-input label { font-size: 1.5rem; color: #ddd; cursor: pointer; transition: color 0.15s; }
.review-stars-input label:hover,
.review-stars-input label:hover ~ label,
.review-stars-input input:checked ~ label { color: #f4a01e; }

.review-field-label { font-size: 0.85rem; font-weight: 600; color: #555; display: block; margin-bottom: 5px; }
.review-required { color: #c62828; }
.review-fields { display: flex; flex-direction: column; gap: 14px; }
.review-field { display: flex; flex-direction: column; }
.review-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.review-input {
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    font-family: inherit;
}
.review-input:focus { border-color: var(--theme-color, #c89b6e); }
.review-textarea { resize: vertical; min-height: 90px; }
.review-submit { align-self: flex-start; }

@media (max-width: 576px) {
    .review-row { grid-template-columns: 1fr; }
}

/* ===========================
   User & Wishlist Icons in Header
   =========================== */
.user-btn,
.wish-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
    position: relative; /* needed for absolute-positioned badge */
}
.user-btn:hover,
.wish-header-btn:hover { color: var(--theme-color, #c89b6e); }

/* Wishlist badge — identical styling to .main-header .cart-btn .count */
.main-header .wish-header-btn .count {
    position: absolute;
    top: 1px;
    right: -8px;
    height: 21px;
    width: 21px;
    line-height: 21px;
    font-size: 12px;
    border-radius: 50%;
    color: #ffffff;
    background-color: var(--theme-color1);
    text-align: center;
}

@media (max-width: 1199.98px) {
    .main-header .wish-header-btn {
        display: inline-flex !important;
        align-items: center;
        margin-right: 16px;
    }
    .main-header .user-btn {
        display: inline-flex !important;
        align-items: center;
        margin-right: 8px;
    }
    /* Hide dividers between icons on mobile — they clutter the tight header */
    .main-header .header-lower .outer-box .divider { display: none !important; }
    /* Admin text link goes in the mobile slide-out menu instead */
    .main-header .admin-hdr-link,
    .main-header .admin-hdr-divider { display: none !important; }
    /* Admin link gold in mobile slide-out menu */
    .mobile-menu .navigation a[href="/admin"] { color: var(--theme-color1, #c89b6e) !important; }
    /* On mobile, badges sit in the top-right corner of the icon
       instead of protruding to the right — prevents overlap with adjacent icons */
    .main-header .wish-header-btn .count,
    .main-header .cart-btn .count {
        top: 0;
        right: -2px;
        width: 17px;
        height: 17px;
        line-height: 17px;
        font-size: 10px;
    }
}

/* ===========================
   Auth Pages (Login / Register)
   =========================== */
.auth-section { padding: 60px 0 80px; }
.auth-box {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 24px rgba(0,0,0,0.07);
    padding: 44px 40px;
}
.auth-box--wide { max-width: 640px; }
.auth-heading { font-size: 1.6rem; font-weight: 700; color: #222; margin-bottom: 6px; }
.auth-sub { color: #888; margin-bottom: 24px; font-size: 0.92rem; }
.auth-errors { background: #fce4ec; color: #c62828; padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 0.88rem; }
.auth-errors p { margin: 0 0 4px; }
.auth-errors p:last-child { margin: 0; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field label { font-size: 0.84rem; color: #666; font-weight: 500; }
.auth-hint { font-weight: 400; color: #aaa; font-size: 0.78rem; }
.auth-input {
    padding: 11px 14px;
    border: 1px solid #d4ccc4;
    border-radius: 4px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.auth-input:focus { border-color: var(--theme-color, #c89b6e); }
.auth-submit { align-self: flex-start; margin-top: 4px !important; }
.auth-alt { margin-top: 20px; text-align: center; color: #888; font-size: 0.88rem; }
.auth-alt a { color: var(--theme-color, #c89b6e); }

@media (max-width: 576px) {
    .auth-box { padding: 28px 18px; }
    .auth-row { grid-template-columns: 1fr; }
}

/* ===========================
   Account Page
   =========================== */
.account-section { padding: 50px 0 80px; }
.account-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}
.account-name { font-size: 1.6rem; font-weight: 700; color: #222; margin: 0 0 4px; }
.account-email { color: #888; margin: 0; font-size: 0.9rem; }
.account-logout-btn {
    background: none;
    border: 1px solid #ddd;
    color: #888;
    padding: 9px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.84rem;
    transition: color 0.2s, border-color 0.2s;
}
.account-logout-btn:hover { color: #c0392b; border-color: #c0392b; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.account-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    padding: 28px;
    margin-bottom: 24px;
}
.account-card-title { font-size: 1.05rem; font-weight: 700; color: #333; margin: 0 0 18px; }
.account-success { background: #e8f5e9; color: #2e7d32; padding: 10px 14px; border-radius: 5px; margin-bottom: 14px; font-size: 0.88rem; }
.account-no-orders { color: #888; }
.account-no-orders a { color: var(--theme-color, #c89b6e); }

@media (max-width: 768px) {
    .account-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------
   Newsletter footer form — success / error feedback message
------------------------------------------------------------------ */
.subscribe-msg {
    font-size: 0.78rem;
    margin-top: 8px;
    color: #c89b6e;
    min-height: 1.2em;
}
.subscribe-msg.error { color: #e74c3c; }

/* ------------------------------------------------------------------
   Checkout — coupon code field
------------------------------------------------------------------ */
.co-coupon-wrap {
    padding: 12px 0 4px;
    border-bottom: 1px solid #f0ebe4;
    margin-bottom: 4px;
}

.co-coupon-label {
    font-size: 0.78rem;
    color: #7a6858;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.co-coupon-row {
    display: flex;
    gap: 8px;
}

.co-coupon-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 9px 12px;
    font-size: 0.85rem;
    color: #333;
    outline: none;
    text-transform: uppercase;
    font-family: inherit;
    background: #fff;
    min-width: 0;
}

.co-coupon-input:focus { border-color: #c89b6e; }

.co-coupon-btn {
    background: #f5f0ea;
    color: #7a6858;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 11px 14px;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

.co-coupon-btn:hover { background: #ede6dc; }
.co-coupon-btn:disabled { opacity: 0.6; cursor: default; }

.co-coupon-msg {
    font-size: 0.78rem;
    margin-top: 6px;
    min-height: 1.1em;
    color: #c89b6e;
}

.co-coupon-msg.error { color: #e74c3c; }

.co-discount-row { color: #2e7d32; font-weight: 500; }
