/* Root variables for consistent theming */
:root {
    --primary-blue: #004d40;
    --accent-orange: #004d40;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --text-muted: #666666;
    --green: #1aba1a;
    --background-light: #f5f7fa;
    --border-radius: 12px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
}

/* Breadcrumb section */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background-color: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 1200px;
    margin: 16px auto;
}

.breadcrumb-button {
    all: unset;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    cursor: pointer;
    transition: var(--transition);
}

.breadcrumb-button:hover {
    color: var(--primary-blue);
}

.breadcrumb-item {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    transition: var(--transition);
}

.breadcrumb-button:hover .breadcrumb-item,
.breadcrumb-wrapper:hover .breadcrumb-item {
    color: var(--primary-blue);
}

.breadcrumb-divider {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.breadcrumb-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    cursor: pointer;
    transition: var(--transition);
}

.breadcrumb-current {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    color: var(--accent-orange);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Product details section */
.pd-product-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.pd-product-details-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Product Wrapper (Gallery + Info) */
.pd-product-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    background-color: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Product Gallery */
.pd-gallery {
    display: flex;
    gap: 16px;
    width: 100%;
}

.pd-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 60px;
}

.pd-thumb {
    width: 100%;
    height: 60px;
    border-radius: 4px;
    border: 1px solid var(--accent-orange);
    background: linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 100%);
    transition: var(--transition);
}

.pd-thumb:hover,
.pd-thumb.active {
    border-color: var(--primary-blue);
    cursor: pointer;
}

.pd-main-image-wrapper {
    flex: 1;
    min-height: 200px;
    position: relative;
}

.pd-main-image {
    width: 100%;
    height: 100%;
    background-size: contain !important;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: var(--border-radius);
    transition: var(--transition);
    background-color: #ffffff;
    min-height: 300px;
}

.pd-discount-badge {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    background-color: var(--accent-orange);
    border-radius: 8px;
    position: absolute;
    top: 12px;
    left: 12px;
    color: var(--text-light);
}

.pd-discount-badge span {
    font-size: 12px;
    font-weight: 500;
}

.pd-discount-badge strong {
    font-size: 16px;
    font-weight: 600;
}

/* Product Info */
.pd-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.pd-title-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.pd-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 20px;
    line-height: 1.4;
    margin: 0;
}

.pd-category {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.pd-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pd-current-price {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    color: var(--accent-orange);
    font-size: 22px;
    line-height: 1.4;
}

.pd-old-price {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: line-through;
}

.pd-short-desc,
.pd-description {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    color: var(--primary-blue);
    font-size: 12px;
    line-height: 1.6;
    margin: 0;
}

.pd-benefits {
    display: flex;
    gap: 12px;
}

.pd-benefit,
.pd-benefit-alt {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.pd-benefit {
    background-color: rgba(26, 186, 26, 0.1);
    color: var(--green);
}

.pd-benefit-alt {
    background-color: rgba(247, 152, 42, 0.1);
    color: var(--accent-orange);
}

.pd-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pd-contact-label {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    color: var(--accent-orange);
    font-size: 12px;
    line-height: 1.5;
}

.pd-contact-number {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 18px;
    line-height: 1.4;
    text-decoration: none;
}

/* Checkout Sidebar */
.pd-checkout-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    background-color: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
}

.pd-checkout-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pd-total {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pd-total span {
    font-size: 12px;
    color: var(--text-muted);
}

.pd-total-amount {
    font-size: 24px;
    color: var(--primary-blue);
    font-weight: 700;
}

.pd-stock {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.pd-in-stock {
    color: var(--green);
}

.pd-out-of-stock {
    color: #dc2626;
}

.pd-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pd-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 16px;
    border: 1px solid var(--background-light);
    border-radius: var(--border-radius);
    background-color: var(--text-light);
}

.pd-qty-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--primary-blue);
    cursor: pointer;
    transition: var(--transition);
}

.pd-qty-btn:hover {
    color: var(--accent-orange);
}

.pd-qty-value {
    font-weight: 700;
    color: var(--primary-blue);
}

.pd-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
}

.pd-btn-checkout {
    background-color: var(--accent-orange);
    color: var(--text-light);
}

.pd-btn-checkout:hover {
    background-color: var(--primary-blue);
    color: var(--text-light);
}

.pd-btn-cart {
    background-color: var(--background-light);
    border: 1px solid var(--accent-orange);
    color: var(--primary-blue);
}

.pd-btn-cart:hover {
    background-color: var(--accent-orange);
    color: var(--text-light);
}

.pd-payment {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pd-payment-label {
    font-size: 12px;
    color: var(--primary-blue);
}

.pd-payment-logos {
    display: flex;
    gap: 12px;
}

.pd-payment-logos img {
    height: 24px;
    width: auto;
}

/* Description Section */
.pd-description-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 16px;
    background-color: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.pd-description-tabs {
    display: flex;
    gap: 24px;
    width: 100%;
    border-bottom: 1px solid var(--background-light);
}

.pd-description-tab {
    padding: 8px 16px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    font-size: 16px;
}

.pd-description-tab:hover {
    color: var(--primary-blue);
}

.pd-description-tab.active,
/* Support for JS adding 'active' class or matching existing logic */
.pd-description-tab[data-active="true"] { 
    font-weight: 700;
    color: var(--primary-blue);
    border-bottom: 2px solid var(--accent-orange);
}

/* If the JS toggles a class like 'active', ensure it works. 
   The old CSS had .solar-product-description-tab-active. 
   The Blade JS likely toggles classes. 
   Wait, the Blade JS I saw only handled images and quantity. 
   The description tabs JS might be elsewhere or inline.
   I'll assume I need to check how tabs are toggled.
   In the Blade file, there is no JS for tabs. 
   Maybe it's in a separate file? Or I missed it.
   Ah, I saw: <div class="solar-product-description-tab" data-tab="description">DESCRIPTION</div>
   But no JS for it in the snippet I read?
   Line 157 in Blade.
   I'll add the JS for tabs in the Blade file later or assume it's global.
   For now, I'll style .active.
*/

.pd-description-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pd-description-text {
    font-family: 'Open Sans', sans-serif;
    color: var(--primary-blue);
    font-size: 14px;
    line-height: 1.8;
}

.pd-description-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    .breadcrumb {
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 4px;
    }

    .pd-product-details {
        padding: 12px;
    }

    .pd-product-wrapper {
        padding: 16px;
        gap: 16px;
    }

    .pd-gallery {
        flex-direction: column;
        gap: 12px;
    }

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

    .pd-thumb {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }

    .pd-checkout-sidebar {
        padding: 16px;
    }
}

/* Desktop Responsiveness */
@media (min-width: 768px) {
    .breadcrumb {
        padding: 12px 24px;
    }

    .pd-product-details {
        padding: 24px;
    }

    .pd-product-wrapper {
        flex-direction: row;
        gap: 32px;
    }

    .pd-gallery {
        width: 50%;
    }

    .pd-info {
        width: 50%;
    }

    .pd-main-image {
        min-height: 300px;
    }
}

@media (min-width: 1024px) {
    .pd-product-details {
        padding: 32px;
    }

    .pd-product-details-container {
        flex-direction: row;
        gap: 32px;
    }

    .pd-product-wrapper {
        flex: 1;
        width: 65%;
    }

    .pd-checkout-sidebar {
        width: 35%;
        max-width: 400px;
        height: fit-content;
        position: sticky;
        top: 20px;
    }

    .pd-gallery {
        display: grid;
        grid-template-columns: 80px 1fr;
        gap: 16px;
    }

    .pd-thumbnails {
        width: 80px;
        max-height: 500px;
        overflow-y: auto;
    }

    .pd-thumb {
        width: 80px;
        height: 80px;
    }

    .pd-main-image {
        min-height: 500px;
    }
}
