/* shop/public/css/product.css */

/* General Variables */
:root {
    --alusik-blue: #23527c;
    --alusik-button-blue: #337ab7;
    --alusik-button-hover: #286090;
    --alusik-dark: #333;
    --alusik-price-color: #23b7e5;
    /* Adjusted to match screenshot approximate */
    --alusik-price-color-new: #337ab7;
    --alusik-border: #ddd;
}

/* Breadcrumbs */
.breadcrumb-item a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.breadcrumb-item.active {
    color: #999;
    font-size: 0.9rem;
}

/* Gallery - Vertical Layout */
.product-gallery-container {
    display: flex;
    gap: 15px;
}

.gallery-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
    width: 80px;
    flex-shrink: 0;
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid transparent;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    transition: border-color 0.2s;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--alusik-button-blue);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.main-image-container {
    flex-grow: 1;
    border: 1px solid #eee;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

.main-image-container img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--alusik-button-blue);
    color: white;
    padding: 2px 8px;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 3px;
}

/* Product Info */
.product-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.product-sku {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.price-wrapper {
    margin-bottom: 1.5rem;
}

.price-old {
    color: #999;
    text-decoration: line-through;
    font-size: 1.1rem;
    margin-right: 10px;
}

.price-current {
    color: var(--alusik-button-blue);
    font-size: 2rem;
    font-weight: 700;
}

.price-unit {
    color: #999;
    font-size: 1rem;
    font-weight: normal;
}

/* Shipping Progress Bar */
.shipping-progress {
    border: 1px dashed #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 25px;
    background-color: #fafafa;
}

.shipping-text {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
    text-align: center;
}

.shipping-text strong {
    color: var(--alusik-button-blue);
}

/* Actions Area */
.actions-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.qty-btn {
    border: none;
    background: transparent;
    padding: 10px 15px;
    font-size: 1.2rem;
    color: #777;
    cursor: pointer;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 1rem;
    color: #333;
    padding: 8px 0;
}

.btn-add-cart {
    background-color: var(--alusik-button-blue);
    color: white;
    border: none;
    padding: 12px 25px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-radius: 3px;
    transition: background 0.2s;
    min-width: 180px;
}

.btn-add-cart:hover {
    background-color: var(--alusik-button-hover);
    color: white;
}

.btn-buy-now {
    background-color: #333;
    color: white;
    border: none;
    padding: 12px 25px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-radius: 3px;
    transition: background 0.2s;
}

.btn-buy-now:hover {
    background-color: #000;
    color: white;
}

.compare-link {
    display: inline-block;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.compare-link i {
    margin-right: 5px;
}

.view-count {
    background-color: #e9ecef;
    padding: 10px 15px;
    border-radius: 4px;
    display: inline-block;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 20px;
}

.category-meta {
    font-size: 0.9rem;
    color: #777;
}

.category-meta a {
    color: #555;
    text-decoration: none;
}

/* Tabs */
.product-tabs {
    margin-top: 4rem;
}

.nav-tabs {
    border-bottom: 1px solid #ddd;
}

.nav-tabs .nav-link {
    border: none;
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 15px 20px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-tabs .nav-link:hover {
    color: var(--alusik-button-blue);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--alusik-button-blue);
    border-bottom: 2px solid var(--alusik-button-blue);
    border-image: linear-gradient(to right, var(--alusik-button-blue), #9b51e0) 1;
}

.tab-content {
    padding: 30px 0;
    color: #555;
    line-height: 1.6;
}

/* Description Images Handling */
.product-description img {
    max-width: 100%;
    height: auto !important;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Description Typography - RELAXED for Landing Pages */
.product-description {
    /* Set a base but allow overrides */
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    /* Prevent horizontal scroll from fixed width elements */
    word-wrap: break-word;
    /* Ensure long words break */
}

/* Make tables responsive wrapper if not already */
.product-description table {
    max-width: 100%;
}

/* Responsiveness */
@media (max-width: 768px) {
    .product-gallery-container {
        flex-direction: column-reverse;
    }

    .gallery-thumbnails {
        flex-direction: row;
        width: 100%;
        max-height: auto;
        overflow-x: auto;
    }

    .gallery-thumb {
        width: 70px;
        height: 70px;
    }

    .price-current {
        font-size: 1.5rem;
    }

    .actions-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .quantity-control {
        justify-content: center;
    }

    /* Ensure tables in description don't break layout */
    .product-description table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
}