/**
 * Fatbikes.be Product Styles
 * Product cards, grid, and product page styling
 * Used on taxons pages, product pages, and anywhere products are displayed
 */

/* ========================================
   PRODUCT GRID & CARDS
   ======================================== */

/* No Products Found State */
.fatbikes-no-products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    min-height: 800px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 0 20px 20px 20px;
    border: 1px solid #e5e5e5;
}

.fatbikes-no-products__icon {
    margin-bottom: 24px;
    color: #d0d0d0;
    animation: float 3s ease-in-out infinite;
}

.fatbikes-no-products__icon svg {
    width: 80px;
    height: 80px;
}

.fatbikes-no-products__title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.fatbikes-no-products__subtitle {
    font-size: 18px;
    color: #666;
    margin: 0 0 16px 0;
}

.fatbikes-no-products__hint {
    font-size: 14px;
    color: #999;
    margin: 0;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Product grid container */
.fatbikes-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Main container with sidebar layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* When sidebar is present (260px + gap) */
.row .col-lg-9 .fatbikes-product-grid {
    /* 1400px - 260px sidebar - gaps = ~1100px for products */
    grid-template-columns: repeat(3, 1fr); /* 3 x 350px products */
}

/* Individual product card */
.fatbikes-product-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 480px; /* Fixed height */
    overflow: hidden;
}

.fatbikes-product-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Remove default link styling */
.fatbikes-product-card .link-reset {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Product image container - remove Bootstrap margins */
.fatbikes-product-card .mb-4 {
    margin-bottom: 0 !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 350px;
}

/* Remove Bootstrap background and rounded corners from image container */
.fatbikes-product-card .bg-light {
    background: transparent !important;
}

.fatbikes-product-card .rounded-3 {
    border-radius: 0 !important;
}

/* Product image container aspect ratio - replaces inline style */
.fatbikes-product-image-container {
    aspect-ratio: 1/1;
}

/* Product image styling */
.fatbikes-product-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 10px;
}

/* Product name styling */
.fatbikes-product-card .h6 {
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    color: #333 !important;
    margin: 0 !important;
    padding: 12px 0px 0px 15px !important;
    min-height: 60px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}



/* Price container */
.fatbikes-product-card > div:last-child {
    padding: 0 15px 15px;
    margin-top: auto;
}

/* Rating styling */
.fatbikes-product-card-rating {
    padding: 0 0 0 15px;
}

/* Price styling */
.fatbikes-product-card [data-test-product-price] {
    color: #32cd33;
    font-size: 18px;
    font-weight: 700;
    display: block;
    margin-bottom: 12px;
    padding: 10px 0 0 15px;
}

.fatbikes-product-card:hover::after {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Move text content container up on hover as one block */
.fatbikes-product-text-content {
    transition: transform 0.3s ease;
}

.fatbikes-product-card:hover .fatbikes-product-text-content {
    transform: translateY(-60px);
}

/* Lock position when processing cart action */
.fatbikes-product-card.processing .fatbikes-product-text-content {
    transform: translateY(-60px) !important;
    transition: none !important;
}

/* Add to cart button styling */
.add-to-cart-btn {
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
    margin: 10px 15px 15px 15px;
    width: calc(100% - 30px) !important;
    background-color: #32cd33 !important;
    border-color: #32cd33 !important;
    color: white !important;
    border-radius: 25px !important;
}

.add-to-cart-btn:hover {
    background-color: black !important;
    border-color: black !important;
}

.product-overview-container {
    width: 50%;
    padding: 0px;
}

.product-info-container {
    margin-bottom: 0 !important;
}

.product-image-container {
    margin: 0 !important;
}

.product-main-image-col {
    margin: 0 !important;
    width: auto !important;
}

.product-overview-container .col {
    padding: 0 !important;
    padding-end: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    width: 550px !important;
    max-width: 550px !important;
}

.product-title {
    font-size: 28px;
}


.product-description-tabs {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.single-product-extras ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.single-product-extras li {
    display: flex;
    align-items: center;
    gap: 6px; /* optional: space between icon and text */
}


/* ========================================
   PRODUCT PAGE THUMBNAILS
   ======================================== */

/* Thumbnail sidebar */
.col-12.col-sm-3 {
    max-width: 150px !important;
    width: 150px !important;
}

#thumbnail-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Thumbnail container - vertical scroll */
#thumbnail-scroll {
    height: 472px;
    overflow: hidden;
    gap: 10px !important;
    scroll-behavior: smooth;
    align-items: center;
    padding-top: 3px;
}


/* Scroll buttons */
.thumbnail-scroll-btn {
    width: 120px;
    height: 30px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail-scroll-btn.scroll-up {
    margin-bottom: 10px;
}

.thumbnail-scroll-btn.scroll-down {
    margin-top: 10px;
}

.thumbnail-scroll-btn:hover:not(.disabled) {
    background: #f5f5f5;
    border-color: #999;
}

.thumbnail-scroll-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #e8e8e8;
    border-color: #aaa;
}

.thumbnail-scroll-btn i {
    font-size: 14px;
    color: #666;
}

/* Main product image */
.product-main-image {
    height: 550px;
    width: 550px;
    max-width: 100%;
}

.product-main-image img {
    object-fit: contain !important;
    border-radius: 15px;
}

/* Individual thumbnail */
.col-12.col-sm-3 .d-flex.flex-column > div {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
}

.col-12.col-sm-3 .d-flex.flex-column > div a {
    display: block;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: border-color 0.3s ease;
    overflow: hidden;
}

.col-12.col-sm-3 .d-flex.flex-column > div a:hover {
    border-color: #ddd;
}

.col-12.col-sm-3 .d-flex.flex-column > div a.active {
    border-color: #32cd33;
}

.col-12.col-sm-3 .d-flex.flex-column > div a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product summary height matching image */
.product-summary-container {
    height: 550px;
    width: 50%;
}

/* Quantity and button side by side */
.product-summary-container form {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
}

.product-summary-container form > div:has(.variant-selection-container) {
    order: 0;
    flex: 1 1 100%;
}

.product-summary-container form .variant-selection-container {
    width: 100%;
}

.product-summary-container form > div:has(input[name*="quantity"]) {
    order: 1;
    flex: 0 0 70px;
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
}

.product-summary-container form > div:has(input[name*="quantity"]) label {
    display: none;
}

.product-summary-container form > div:has(input[name*="quantity"]).field {
    margin-bottom: 0 !important;
}

.product-summary-container form .field.mb-3 {
    margin-bottom: 0 !important;
}

.product-summary-container form > div:has(button[type="submit"]) {
    order: 2;
    flex: 1;
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
}

/* Product accordion - full width */
.accordion.accordion-flat {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 5px;
}

/* Product variant options styling */
.variant-selection-container {
    display: block;
    margin: 15px 0;
    width: 100%;
}

.variant-options-header {
    display: block;
}

.product-variant-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

.variant-option {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 250px;
    line-height: 1.2;
}



.variant-option:hover {
    background: #fef7f0;
    border-color: #ffb74d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.variant-option.selected {
    background: #e8f5e8;
    border-color: #32cd33;
    box-shadow: 0 4px 12px rgba(50, 205, 51, 0.15);
}

.variant-option .form-check {
    margin: 0;
    display: flex;
    align-items: center;
    order: 1;
    padding-left: 0;
}

.variant-option .form-check-input {
    margin: 0;
    flex-shrink: 0;
    padding: 0;
}

.variant-option .form-check-label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    padding-right: 10px;
    flex: 1;
}

.variant-option .fw-semibold {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 4px;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: 400 !important;
}

/* Name section (div with fw-semibold) */
.variant-option > div:nth-child(1) {
    order: 2;
}

/* Price section (span) */
.variant-option > span {
    order: 3;
}

/* Badge section (+50) */
.variant-option > div:nth-child(2) {
    order: 4;
}

/* Button styling - green with black hover */
.product-summary-container button[type="submit"],
.product-summary-container .btn-primary {
    background-color: #32cd33 !important;
    border-color: #32cd33 !important;
    color: white !important;
}

.product-summary-container button[type="submit"]:hover,
.product-summary-container .btn-primary:hover {
    background-color: black !important;
    border-color: black !important;
    color: white !important;
}

/* ========================================
   SPECIFICATIONS TABLE
   ======================================== */

.specifications-table-container {
    overflow-x: auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1rem;
}

.specifications-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.specifications-table tbody tr {
    transition: background-color 0.2s ease;
}

.specifications-table tbody tr:nth-of-type(odd) {
    background-color: rgba(248, 250, 252, 0.5);
}

.specifications-table tbody tr:hover {
    background-color: rgba(241, 245, 249, 0.8);
}

.specifications-table th {
    font-weight: 600;
    color: #334155;
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    width: 30%;
    min-width: 120px;
}

.specifications-table td {
    color: #475569;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.specifications-table tbody tr:last-child th,
.specifications-table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   RESPONSIVE MEDIA QUERIES
   ======================================== */

/* TABLET (1024px) */
@media (max-width: 1024px) {

    .fb-category-container {
        padding: 0 10px;
    }

    .fatbikes-product-card {
        height: 480px;
    }

    .product-info-container {
        gap: 0 !important;
        margin: 0 !important;
    }

    .product-overview-container {
        width: 100% !important;
    }

    .product-summary-container {
        width: 100% !important;
        height: auto !important;
        margin-top: 20px;
    }

    .product-image-container {
        flex-direction: column !important;
    }

    .col-12.col-sm-3 {
        max-width: 100% !important;
        width: 100% !important;
        order: 2;
        margin-top: 10px;
    }

    .product-overview-container .col {
        order: 1;
        width: 100% !important;
        max-width: 100% !important;
    }

    .product-main-image {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }

    #thumbnail-scroll {
        display: flex !important;
        flex-direction: row !important;
        height: auto !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
    }

    .product-description-tabs {
        width: 100%;
        padding: 0 15px;
    }

    /* Product grid adjustments */
    .row .col-lg-9 .fatbikes-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fatbikes-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* MOBILE (768px) */
@media (max-width: 768px) {
    .fatbikes-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .fatbikes-product-card-name {
        min-height: auto;
    }

    .fatbikes-product-card::after {
        opacity: 1;
        transform: translateY(0);
    }

    .fatbikes-product-card {
        padding-bottom: 60px;
    }

    /* Specifications table */
    .specifications-table th,
    .specifications-table td {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }

    .specifications-table th {
        width: 40%;
    }
}

/* SMALL MOBILE (480px) */
@media (max-width: 480px) {
    .fatbikes-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .fatbikes-product-card {
        height: auto;
        min-height: 420px;
    }

    .fatbikes-product-card .h6 {
        font-size: 13px !important;
        padding: 10px 12px 6px !important;
    }

    .fatbikes-product-card [data-test-product-price] {
        font-size: 16px;
    }
}

