/* ==========================================================================
   TCM Product Styles – tcm-product-styles.css
   Author: Tickled Chilli (tickledchilli.co.uk)
   Version: 1.4.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   SHOP / ARCHIVE CARDS
   -------------------------------------------------------------------------- */

ul.products li.product,
.woocommerce ul.products li.product {
    background: #F6F6F6;
    border-radius: 16px;
    padding: 20px 20px 24px;
    position: relative;
    display: flex !important;
    flex-direction: column;
    box-shadow: none;
    border: 2px solid transparent;
    overflow: hidden;
}

ul.products li.product:hover,
.woocommerce ul.products li.product:hover {
    border: 2px solid #1906C0;
}

ul.products li.product a img,
.woocommerce ul.products li.product a img {
    border: none;
    box-shadow: none;
    border-radius: 8px;
    display: block;
    margin: 0 0 16px;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transform: none !important;
    transition: none !important;
}

ul.products li.product a:hover img,
.woocommerce ul.products li.product a:hover img {
    transform: none !important;
    opacity: 1 !important;
}

.tcm-category-badge {
    display: inline-block;
    background: #EDEDF9;
    color: #1a1a2e;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    padding: 8px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    align-self: flex-start;
    letter-spacing: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .woocommerce-loop-product__title {
    font-size: 22px;
    font-weight: 700;
    color: #0d1b3e;
    padding: 8px 0 6px;
    margin: 0;
    line-height: 1.25;
}

.tcm-short-desc {
    font-size: 15px;
    color: #9a9aaa;
    line-height: 1.5;
    margin: 0 0 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: calc(1.5em * 2);
    flex-grow: 1;
}

.woocommerce ul.products li.product .price,
ul.products li.product .price {
    display: none !important;
}

.tcm-hire-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: #2196f3;
    color: #ffffff !important;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    padding: 18px 20px;
    border-radius: 10px;
    text-decoration: none !important;
    margin-top: auto;
    letter-spacing: 0.01em;
}

.tcm-hire-btn:hover,
.tcm-hire-btn:focus,
.tcm-hire-btn:active {
    background: #2196f3;
    color: #ffffff !important;
    text-decoration: none !important;
}

ul.products li.product .button,
.woocommerce ul.products li.product .button {
    display: none !important;
}

@media ( max-width: 600px ) {
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 18px;
    }
    .tcm-hire-btn {
        font-size: 15px;
        padding: 15px 16px;
    }
}

/* --------------------------------------------------------------------------
   PRODUCT CAROUSEL WIDGET
   -------------------------------------------------------------------------- */

.tcm-carousel-wrapper {
    width: 100%;
    overflow: hidden; /* clip the track so bleed stays invisible until scrolled */
}

/* Header row: heading left, arrows right */
.tcm-carousel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.tcm-carousel__heading {
    font-size: 32px;
    font-weight: 700;
    color: #0d1b3e;
    margin: 0;
    line-height: 1.2;
}

/* Nav arrows */
.tcm-carousel__nav {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.tcm-carousel__nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1.5px solid #0d1b3e;
    border-radius: 10px;
    background: transparent;
    color: #0d1b3e;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 0;
}

.tcm-carousel__nav-btn:hover {
    background: #0d1b3e;
    color: #ffffff;
}

.tcm-carousel__nav-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

/*
 * Outer: clips overflow on the left, but lets cards bleed to the right.
 * We achieve this by not setting overflow-x: hidden here – the wrapper
 * above clips the left side while we use a negative right margin trick.
 */
.tcm-carousel__track-outer {
    overflow: visible;
    position: relative;
}

/* The scrollable track – extends beyond its container on the right */
.tcm-carousel__track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    /* Allow track to extend naturally – no overflow clipping here */
    width: max-content;
}

/* Individual card */
.tcm-carousel-card {
    display: flex;
    flex-direction: column;
    background: #F6F6F6;
    border-radius: 16px;
    border: 2px solid transparent;
    padding: 16px 16px 20px;
    text-decoration: none !important;
    color: inherit;
    flex-shrink: 0;
    /* Responsive card width: ~3.3 cards visible by default */
    width: clamp(220px, 28vw, 320px);
    transition: border-color 0.15s ease;
    box-sizing: border-box;
    overflow: hidden;
}

.tcm-carousel-card:hover {
    border-color: #1906C0;
    text-decoration: none !important;
    color: inherit;
}

/* Category badge inside card (inherits shared .tcm-category-badge styles) */
.tcm-carousel-card .tcm-category-badge {
    margin-bottom: 10px;
}

/* Image */
.tcm-carousel-card__image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 14px;
    background: #ebebeb;
}

.tcm-carousel-card__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Card body */
.tcm-carousel-card__body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tcm-carousel-card__title {
    font-size: 20px;
    font-weight: 700;
    color: #0d1b3e;
    margin: 0 0 10px;
    line-height: 1.25;
}

/* Footer row: price left, "View +" right */
.tcm-carousel-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.tcm-carousel-card__price {
    font-size: 14px;
    color: #6b6b7b;
    font-weight: 400;
}

.tcm-carousel-card__view {
    font-size: 14px;
    font-weight: 600;
    color: #2196f3;
}

/* Mobile: make cards a bit narrower, heading smaller */
@media ( max-width: 768px ) {
    .tcm-carousel__heading {
        font-size: 24px;
    }
    .tcm-carousel-card {
        width: clamp(180px, 72vw, 280px);
    }
}


/* ==========================================================================
   CART PAGE — Custom FGS Template
   ========================================================================== */

/* Override UiCore framework grid on .woocommerce-cart .woocommerce —
   it sets 2.2fr 1fr columns expecting classic cart structure.
   Our .fgs-cart handles its own two-column layout internally. */
.woocommerce-cart .woocommerce {
    display: block !important;
}

/* --- Layout: two-column cart + sidebar --- */
.fgs-cart {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}

@media (max-width: 900px) {
    .fgs-cart {
        grid-template-columns: 1fr;
    }
}

/* --- Top bar: Back to Shopping --- */
.fgs-cart__top-bar {
    margin-bottom: 20px;
}

.fgs-cart__back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #017BDF;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.fgs-cart__back-btn:hover {
    text-decoration: underline;
    color: #1906C0;
}

/* --- Cart items --- */
.fgs-cart-item {
    display: grid;
    grid-template-columns: 80px 1fr 160px;
    gap: 16px;
    align-items: start;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

@media (max-width: 640px) {
    .fgs-cart-item {
        grid-template-columns: 1fr 1fr;
    }
    .fgs-cart-item__image {
        grid-column: 1;
        grid-row: 1;
    }
    .fgs-cart-item__details {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    .fgs-cart-item__right {
        grid-column: 2;
        grid-row: 1;
    }
}

.fgs-cart-item__image img {
    border-radius: 6px;
    display: block;
}

.fgs-cart-item__name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #0C0730;
    text-decoration: none;
    margin-bottom: 8px;
    line-height: 1.3;
}

.fgs-cart-item__name:hover {
    color: #017BDF;
}

/* --- Meta list (SKU, custom fields) --- */
.fgs-cart-item__meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    word-break: normal !important;
    hyphens: none !important;
}

.fgs-cart-item__meta-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 8px;
    font-size: 0.8125rem;
    color: #666;
    line-height: 1.4;
    align-items: baseline;
}

.fgs-cart-item__meta-label {
    font-weight: 600;
    color: #444;
    white-space: nowrap;
    padding-top: 1px;
}

.fgs-cart-item__meta-label::after {
    content: ':';
}

.fgs-cart-item__meta-value {
    color: #666;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    white-space: normal;
}

/* --- Right column: qty / price / remove stacked --- */
.fgs-cart-item__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    justify-content: flex-start;
    padding-top: 2px;
}

/* --- Quantity stepper --- */
.fgs-cart-item__qty-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.fgs-qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    overflow: hidden;
}

.fgs-qty-btn {
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 40px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: #333;
    padding: 0;
    transition: background 0.15s;
}

.fgs-qty-btn:hover {
    background: #e8e8e8;
}

.fgs-qty-stepper input[type="number"] {
    width: 48px;
    height: 40px;
    border: none;
    border-left: 1px solid #d0d0d0;
    border-right: 1px solid #d0d0d0;
    text-align: center;
    font-size: 0.9375rem;
    -moz-appearance: textfield;
    padding: 0;
}

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

.fgs-cart-item__qty-fixed {
    font-size: 0.8125rem;
    color: #555;
    font-weight: 500;
}

/* --- Item subtotal --- */
.fgs-cart-item__subtotal {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
    white-space: nowrap;
}

.fgs-cart-item__price-incvat {
    font-size: 1rem;
    font-weight: 700;
    color: #0C0730;
    white-space: nowrap;
}
.fgs-cart-item__price-incvat bdi {
    white-space: nowrap;
}

.fgs-cart-item__price-exvat {
    font-size: 0.75rem;
    color: #888;
}

/* --- Remove button --- */
/* Remove WooCommerce checkbox/icon glyph before remove link */
.fgs-cart-remove::before,
.fgs-cart-item__remove a::before {
    display: none !important;
    content: none !important;
}
.fgs-cart-item__remove input[type="checkbox"] {
    display: none !important;
}

.fgs-cart-item__remove {
    display: flex;
    align-items: center;
}

.fgs-cart-remove {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #999;
    font-size: 0.8125rem;
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
}

.fgs-cart-remove:hover {
    color: #d0392b;
}

.fgs-cart-remove svg {
    flex-shrink: 0;
}

/* --- Cart actions (hidden update button) --- */
.fgs-cart__actions {
    margin-top: 8px;
}

/* ==========================================================================
   ORDER SUMMARY SIDEBAR
   ========================================================================== */

.fgs-order-summary {
    background: #EDEDF9;
    border-radius: 12px;
    padding: 28px 24px;
    position: sticky;
    top: 24px;
}

.fgs-order-summary__heading {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0C0730;
    margin: 0 0 4px;
}

.fgs-order-summary__count {
    font-size: 0.875rem;
    color: #666;
    margin: 0 0 20px;
}

.fgs-order-summary__table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.fgs-order-summary__table th,
.fgs-order-summary__table td {
    padding: 8px 0;
    font-size: 0.9375rem;
    border: none;
    background: transparent;
    vertical-align: middle;
}

.fgs-order-summary__table th {
    text-align: left;
    font-weight: 500;
    color: #444;
    width: 55%;
}

.fgs-order-summary__table td {
    text-align: right;
    color: #333;
}

.fgs-order-summary__table .cart-subtotal th,
.fgs-order-summary__table .cart-subtotal td {
    border-top: none;
}

.fgs-order-summary__table tr + tr th,
.fgs-order-summary__table tr + tr td {
    border-top: 1px solid rgba(0,0,0,0.08);
}

.fgs-order-summary__total-row th,
.fgs-order-summary__total-row td {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0C0730;
    border-top: 2px solid rgba(0,0,0,0.15) !important;
    padding-top: 14px;
}
.fgs-order-summary__total-row td .includes_tax {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #888;
    white-space: nowrap;
}

/* WooCommerce injects amount spans */
.fgs-order-summary__table .woocommerce-Price-amount {
    font-weight: inherit;
    color: inherit;
}

/* --- Checkout button --- */
.fgs-order-summary__checkout .checkout-button,
.fgs-order-summary__checkout a.checkout-button {
    display: block;
    width: 100%;
    background: #017BDF;
    color: #fff !important;
    text-align: center;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.fgs-order-summary__checkout .checkout-button:hover,
.fgs-order-summary__checkout a.checkout-button:hover {
    background: #1906C0;
}
