/* --- GLOBAL STYLES & FONTS --- */

:root {
    --primary-yellow: #ffcd1c;
    --dark-blue: #002494;
    --dark-grey-bg: #262329;
    --footer-bg: #3a3a3a;
    --footer-social-bg: #f0f0f0;
    --text-color: #212121;
    --text-light: #666;
    --border-color: #e1e1e1;
    --font-body: 'Work Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Work Sans', sans-serif;
    color: var(--text-color);
    background-color: #fff;
    font-size: 16px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--dark-blue);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-yellow);
}

button {
    cursor: pointer;
    font-family: 'Work Sans', sans-serif;
}


/* --- MAIN CONTENT --- */


.product-page-container {
    padding-top: 40px;
    padding-bottom: 40px;
}

.product-main-view {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.product-gallery img {
    max-width: 100%;
    border: 1px solid var(--border-color);
}

.product-gallery .zoom-text {
    text-align: center;
    color: var(--text-light);
    font-size: 12px;
    margin-top: 10px;
}

.product-summary h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-summary .product-sku {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* ---- PRODUCT INFO BAR (delivery + stock on one line) ---- */
.product-info-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    width: fit-content;
    max-width: 100%;
}

.info-bar__item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
}

.info-bar__item--delivery {
    color: #15803d;
}

.info-bar__item--in-stock {
    color: #15803d;
}

.info-bar__item--low {
    color: #b45309;
    font-weight: 700;
}

.info-bar__sep {
    color: #9ca3af;
    font-size: 14px;
    line-height: 1;
    user-select: none;
}

.out-of-stock {
    display: inline-flex;
    align-items: center;
    background-color: #fef2f2;
    color: #dc2626;
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid #fee2e2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- STOCK DOT ---- */
.stock-badge {
    display: none; /* kept for legacy, replaced by info-bar__item */
}
.stock-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse-dot 2s infinite;
}
.dot--green { background: #16a34a; }
.dot--amber { background: #d97706; }
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.85); }
}


.out-of-stock::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #dc2626;
    border-radius: 50%;
    margin-right: 8px;
}

/* Unified Out of Stock Badge */
.out-of-stock-badge {
    display: inline-block;
    background-color: #94a3b8;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-top: 5px;
}

.is-out-of-stock {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.product-summary .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 20px;
}

.was-price-single {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 5px;
}

.price-single.sale-active {
    font-size: 28px;
    font-weight: 700;
    color: #d9534f;
    margin-bottom: 20px;
}

.product-specs {
    margin-bottom: 20px;
    padding-left: 20px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.product-specs li {
    list-style-type: disc;
    margin-bottom: 8px;
    color: #333;
}

.cart-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.quantity-selector label {
    margin-right: 10px;
    font-weight: 600;
}

.quantity-input {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.quantity-input button {
    background-color: #f5f5f5;
    border: none;
    width: 30px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
}

.quantity-input input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    font-size: 16px;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.add-to-cart-button {
    background-color: var(--primary-yellow);
    border: none;
    padding: 10px 30px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.add-to-cart-button:hover {
    background-color: #e6b800;
}

/* Frequently Bought Together */

.frequently-bought {
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 40px;
    background: #fff;
    border-radius: 8px;
}

.frequently-bought h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.fbt-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.fbt-items {
    display: flex;
    align-items: stretch;
    gap: 15px;
    flex-wrap: wrap;
}

.fbt-item {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    width: 150px;
    display: flex;
    flex-direction: column;
}

.fbt-item img {
    max-width: 100px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 10px;
    flex-shrink: 0;
}

.fbt-item a {
    display: block;
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--dark-blue);
    text-decoration: none;
    flex-grow: 1;
}

.fbt-item a:hover {
    text-decoration: underline;
}

.fbt-item span {
    font-weight: 700;
    color: var(--dark-blue);
    margin-top: auto;
}

.plus-symbol {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-light);
    align-self: center;
}

.fbt-summary {
    text-align: right;
    min-width: 200px;
}

.fbt-summary p {
    font-size: 14px;
    margin-bottom: 10px;
}

.fbt-summary p span {
    font-size: 22px;
    font-weight: 700;
    color: #e53935;
}

.fbt-summary .add-all-to-cart {
    background-color: var(--primary-yellow);
    border: none;
    padding: 10px 20px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
}

.fbt-checklist {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.fbt-checklist p {
    margin-bottom: 8px;
    font-size: 14px;
}

.fbt-checklist input[type="checkbox"] {
    accent-color: var(--primary-yellow);
}

.fbt-checklist label {
    margin-left: 8px;
}

.fbt-checklist label span {
    color: #e53935;
    font-weight: 600;
}

/* Product Details Tabs */
.tabs {
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

.tab-link {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.tab-link:hover {
    color: var(--text-color);
}

.tab-link.active {
    color: var(--text-color);
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-yellow);
}

.description-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.desc-item img {
    max-width: 100%;
    border-radius: 5px;
}

.desc-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

/* Pull left/right utility classes */
.pull-left {
    grid-column: 1;
    text-align: left;
}

.pull-left img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.pull-right {
    grid-column: 2;
    text-align: left;
}

.pull-right img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}




/* Related Products */
.related-products {
    margin-top: 60px;
    position: relative;

}

.carousel {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.related-products h2 {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.related-products h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-yellow);
    border-radius: 2px;
}

/* Responsive grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Product card */
.product-card {
    flex: 0 0 23%;
    margin: 10px;
    border: 1px solid var(--border-color);
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    background: #fff;
    transition: transform 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.product-card img {
    max-width: 100%;
    height: 160px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* Product code */
.product-card .product-code {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 5px;
}

/* Product title */
.product-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    min-height: 40px;
    line-height: 1.3;
}

/* Footer: price + button */
.product-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-card .product-price {
    font-weight: 700;
    color: var(--dark-blue);
    font-size: 15px;
}

/* Add to cart button */
.add-to-cart-icon {
    background-color: var(--dark-blue);
    color: #fff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-to-cart-icon:hover {
    background-color: var(--primary-yellow);
    color: var(--dark-blue);
}



.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    z-index: 5;
    border-radius: 50%;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: #ffcd1c;
    color: #002494;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

@media (max-width: 992px) {
    .product-card {
        flex: 0 0 48%;
    }
}

@media (max-width: 768px) {
    .product-main-view {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-summary h1 {
        font-size: 20px;
    }

    .product-summary .price {
        font-size: 24px;
    }

    .description-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pull-left,
    .pull-right {
        grid-column: 1;
    }

    .desc-item img {
        margin-bottom: 15px;
    }

    .fbt-container {
        flex-direction: column;
        align-items: center;
    }

    .fbt-items {
        justify-content: center;
    }

    .fbt-summary {
        text-align: center;
        min-width: 100%;
        margin-top: 20px;
    }

    .product-variations-container {
        padding-top: 15px;
        margin-top: 15px;
    }

    .variations-grid {
        justify-content: center;
    }

    .variation-card {
        width: calc(50% - 15px);
        max-width: 150px;
    }
}

@media (max-width: 600px) {
    .product-card {
        flex: 0 0 97%;
    }
}

/* Product Variations / Colors */
.product-variations-container {
    grid-column: 1 / -1;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    scroll-margin-top: 100px;
    /* Offset for sticky header if any */
}

.product-variations-container h3 {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--dark-blue);
}

.variations-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.variation-card {
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    width: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    background: #fff;
    text-decoration: none;
    height: 100%;
}

.variation-card:hover {
    border-color: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.variation-card.active {
    border-color: var(--dark-blue);
    background-color: #f0f4ff;
    box-shadow: 0 0 0 1px var(--dark-blue);
}

.variation-card img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    margin-bottom: 8px;
}

.variation-card .variant-name {
    font-size: 12px;
    line-height: 1.3;
    color: var(--text-color);
    font-weight: 500;
}

/* --- COLOR SELECTION --- */
.color-selection {
    margin-top: 25px;
    margin-bottom: 25px;
}

.color-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text-light);
}

.color-label strong {
    font-weight: 700;
    color: var(--text-color);
}

.color-sublabel {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.swatch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.swatch-link {
    display: block;
    padding: 2px;
    border: 1px solid transparent;
    border-radius: 50%;
    transition: all 0.2s ease;
    text-decoration: none;
}

.swatch-link:hover {
    border-color: #ddd;
}

.swatch-link.active {
    border: 3px solid #111;
    padding: 1px;
}

/* Checkmark overlay on selected swatch */
.swatch-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    z-index: 1;
}

.swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.swatch-link.active .swatch {
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #000;
}

.swatch-link.active .out-of-stock-line {
    background-color: rgba(255, 255, 255, 0.4);
}

.out-of-stock-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) rotate(-45deg);
    pointer-events: none;
}

.swatch:has(.out-of-stock-line) {
    opacity: 0.6;
    cursor: default;
}

/* --- PRODUCT VIDEO --- */
.product-video-section {
    width: 100%;
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.product-video {
    width: 100%;
    max-height: 500px;
    display: block;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    width: 100%;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- PRODUCT DOWNLOADS --- */
.product-downloads {
    margin-top: 40px;
    margin-bottom: 40px;
}

.product-downloads h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark-blue);
    text-transform: uppercase;
}

.pdf-download-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    max-width: 350px;
    cursor: pointer;
}

.pdf-download-card:hover {
    background: #fff;
    border-color: #e53935;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.pdf-icon {
    font-size: 32px;
    color: #e53935;
    flex-shrink: 0;
}

.pdf-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pdf-filename {
    font-weight: 600;
    color: var(--text-color);
    font-size: 15px;
}

.pdf-size {
    font-size: 12px;
    color: var(--text-light);
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.pt-4 {
    padding-top: 1.5rem !important;
}

.border-top {
    border-top: 1px solid var(--border-color) !important;
}

@media (max-width: 768px) {
    .pdf-download-card {
        max-width: 100%;
    }
}

/* --- PRODUCT SPECIFICATIONS --- */
.product-specifications {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    margin-top: 10px;
}

.product-specifications h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark-blue);
}

.specs-group-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 8px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.specs-table tr:nth-child(odd) {
    background-color: #f7f8fa;
}

.specs-table th,
.specs-table td {
    padding: 9px 14px;
    font-size: 14px;
    text-align: left;
    border: 1px solid var(--border-color);
    vertical-align: top;
}

.specs-table th {
    width: 38%;
    font-weight: 600;
    color: #444;
    background-color: #f0f2f5;
}

.specs-table td {
    color: var(--text-color);
    overflow-wrap: anywhere;
}

.specs-raw {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.7;
}