/* ========================================
   TruckCenter Chile - Product Detail Styles
   Diseño Premium Modernizado
   ======================================== */

/* Breadcrumb Section */
.page-breadcrumb {
    margin-top: 110px;
    padding: 20px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid var(--gray-200);
}

/* Product Detail Section */
.product-detail-section {
    padding: 60px 0;
    background: var(--white);
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Product Gallery - Modernizado */
.product-gallery {
    position: sticky;
    top: 130px;
}

.gallery-main {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.gallery-main:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.gallery-main img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    padding: 40px;
}

.gallery-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 18px;
    font-size: 0.8125rem;
    font-weight: 700;
    border-radius: 50px;
    z-index: 2;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-badge.sale {
    background: linear-gradient(135deg, #df8223 0%, #c67320 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(223, 130, 35, 0.3);
}

.gallery-badge.new {
    background: linear-gradient(135deg, #df8223 0%, #c67320 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(42, 157, 143, 0.3);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.gallery-nav:hover {
    background: #df8223;
    color: #1a1a1a;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(223, 130, 35, 0.4);
}

.gallery-nav.prev {
    left: 20px;
}

.gallery-nav.next {
    right: 20px;
}

.gallery-thumbs {
    display: flex;
    gap: 15px;
}

.gallery-thumb {
    width: 90px;
    height: 90px;
    background: #f8f9fa;
    border: 3px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-thumb:hover {
    border-color: #df8223;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-thumb.active {
    border-color: #df8223;
    box-shadow: 0 0 0 1px #df8223;
}

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

/* Product Info - Rediseñado */
.product-detail-info {
    padding: 10px 0;
}

.product-detail-category {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #df8223;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.product-detail-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    margin-bottom: 8px;
    line-height: 1.2;
    color: #1a1a1a;
}

.product-detail-brand {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 24px;
}

.product-detail-brand strong {
    color: #1a365d;
    font-weight: 700;
}

/* Stock Status - Mejorado */
.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.stock-status.in-stock {
    background: linear-gradient(135deg, rgba(42, 157, 143, 0.15) 0%, rgba(42, 157, 143, 0.05) 100%);
    color: #df8223;
    border: 2px solid rgba(42, 157, 143, 0.3);
}

.stock-status.low-stock {
    background: linear-gradient(135deg, rgba(233, 196, 106, 0.2) 0%, rgba(233, 196, 106, 0.05) 100%);
    color: #b8860b;
    border: 2px solid rgba(233, 196, 106, 0.4);
}

.stock-status.out-of-stock {
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.15) 0%, rgba(230, 57, 70, 0.05) 100%);
    color: #e63946;
    border: 2px solid rgba(230, 57, 70, 0.3);
}

/* Price - Premium Design */
.product-detail-price {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 20px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 14px;
    border: 2px solid rgba(223, 130, 35, 0.2);
}

.detail-price-current {
    font-family: 'Archivo Black', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: #df8223;
    text-shadow: 0 2px 10px rgba(223, 130, 35, 0.2);
}

.detail-price-original {
    font-size: 1.5rem;
    color: var(--gray-500);
    text-decoration: line-through;
}

.detail-price-discount {
    padding: 6px 14px;
    background: linear-gradient(135deg, #e63946 0%, #c62828 100%);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

/* Short Description */
.product-short-desc {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
    padding: 16px 18px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #df8223;
}

/* Quick Specs - Modernizado */
.quick-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    padding: 18px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.quick-spec {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.quick-spec:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(223, 130, 35, 0.3);
    transform: translateY(-2px);
}

.quick-spec-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.quick-spec-value {
    font-size: 1rem;
    font-weight: 700;
    color: #df8223;
}

/* Quantity Selector */
.product-quantity {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.product-quantity label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 1rem;
}

.quantity-selector-large {
    display: flex;
    align-items: center;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
}

.quantity-selector-large .qty-btn {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    background: var(--gray-100);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    color: #1a1a1a;
}

.quantity-selector-large .qty-btn:hover {
    background: #df8223;
    color: #1a1a1a;
}

.quantity-selector-large .qty-input {
    width: 80px;
    height: 50px;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    border: none;
    border-left: 2px solid var(--gray-300);
    border-right: 2px solid var(--gray-300);
}

/* Actions - Botones Premium */
.product-detail-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.product-detail-actions .btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-add-cart-large {
    background: linear-gradient(135deg, #df8223 0%, #c67320 100%);
    color: #1a1a1a;
    border: 2px solid #df8223;
    box-shadow: 0 6px 25px rgba(223, 130, 35, 0.3);
}

.btn-add-cart-large:hover {
    background: linear-gradient(135deg, #c67320 0%, #cc5500 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(223, 130, 35, 0.4);
}

.btn-whatsapp-large {
    background: linear-gradient(135deg, #df8223 0%, #c67320 100%);
    color: var(--white);
    border: 2px solid #df8223;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-large:hover {
    background: linear-gradient(135deg, #c67320 0%, #0d6e5f 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

/* Features - Diseño Mejorado */
.product-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--white);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #df8223 0%, #c67320 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.feature-text {
    font-size: 0.875rem;
    line-height: 1.4;
}

.feature-text strong {
    display: block;
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 2px;
}

.feature-text span {
    color: var(--gray-600);
}

/* ========================================
   Product Tabs Section - Premium
   ======================================== */
.product-tabs-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-tabs {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.1);
}

.tabs-nav {
    display: flex;
    border-bottom: 2px solid var(--gray-200);
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.tab-btn {
    flex: 1;
    padding: 24px 28px;
    background: none;
    border: none;
    font-size: 1.0625rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn:hover {
    color: #df8223;
    background: rgba(223, 130, 35, 0.05);
}

.tab-btn.active {
    color: #df8223;
    background: var(--white);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #df8223 0%, #c67320 100%);
}

.tabs-content {
    padding: 40px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Description Tab */
#tab-description {
    font-size: 1.0625rem;
    line-height: 1.9;
    color: var(--gray-700);
}

#tab-description p {
    margin-bottom: 20px;
}

#tab-description ul {
    padding-left: 30px;
    margin-bottom: 20px;
}

#tab-description li {
    list-style: none;
    margin-bottom: 10px;
    position: relative;
    padding-left: 10px;
}

#tab-description li::before {
    content: '→';
    position: absolute;
    left: -20px;
    color: #df8223;
    font-weight: 700;
}

/* Specs Tab - Premium Grid */
.specs-table {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: var(--gray-200);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    overflow: hidden;
}

.spec-row {
    display: flex;
    background: var(--white);
}

.spec-label {
    flex: 0 0 40%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.9375rem;
}

.spec-value {
    flex: 1;
    padding: 18px 24px;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.9375rem;
}

/* Shipping Tab - Cards Premium */
.shipping-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.info-card {
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    border: 2px solid rgba(223, 130, 35, 0.1);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(223, 130, 35, 0.3);
}

.info-card i {
    font-size: 2.5rem;
    color: #df8223;
    margin-bottom: 20px;
    display: block;
}

.info-card h4 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

.info-card p {
    color: var(--gray-600);
    margin-bottom: 20px;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.info-card ul {
    padding-left: 25px;
}

.info-card li {
    list-style: none;
    color: var(--gray-700);
    font-size: 0.9375rem;
    margin-bottom: 10px;
    position: relative;
    padding-left: 10px;
}

.info-card li::before {
    content: '✓';
    position: absolute;
    left: -20px;
    color: #df8223;
    font-weight: 700;
    font-size: 1.125rem;
}

/* ========================================
   Related Products Section
   ======================================== */
.related-products {
    padding: 50px 0;
    background: var(--white);
}

.related-products .products-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: #df8223 #f0f0f0;
    -webkit-overflow-scrolling: touch;
}

.related-products .products-grid::-webkit-scrollbar {
    height: 5px;
}

.related-products .products-grid::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.related-products .products-grid::-webkit-scrollbar-thumb {
    background: #df8223;
    border-radius: 4px;
}

.related-products .products-grid .product-card {
    flex: 0 0 260px;
    min-width: 260px;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: #df8223;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: var(--gray-600);
    font-size: 1rem;
}

/* ========================================
   Responsive Styles
   ======================================== */
@media (max-width: 991.98px) {
    .page-breadcrumb {
        margin-top: 82px;
    }

    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .product-gallery {
        position: static;
        max-width: 500px;
        margin: 0 auto;
    }

    .product-detail-title {
        font-size: 2rem;
    }

    .detail-price-current {
        font-size: 2.5rem;
    }

    .shipping-info {
        grid-template-columns: 1fr;
    }

    .specs-table {
        grid-template-columns: 1fr;
    }

    .product-features {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .product-detail-price {
        flex-wrap: wrap;
        padding: 25px;
    }

    .detail-price-current {
        font-size: 2.25rem;
    }

    .quick-specs {
        grid-template-columns: 1fr;
    }

    .product-detail-actions {
        flex-direction: column;
    }

    .tabs-nav {
        flex-direction: column;
    }

    .tab-btn {
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .tab-btn.active::after {
        height: 100%;
        width: 4px;
        left: 0;
        top: 0;
        bottom: 0;
    }

    .tabs-content {
        padding: 30px 20px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .product-detail-title {
        font-size: 1.75rem;
    }

    .detail-price-current {
        font-size: 2rem;
    }

    .gallery-thumbs {
        overflow-x: auto;
        padding-bottom: 8px;
    }

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

    .product-quantity {
        flex-direction: column;
        align-items: flex-start;
    }

    .quantity-selector-large {
        width: 100%;
        justify-content: center;
    }

    .quantity-selector-large .qty-input {
        flex: 1;
    }

    .gallery-main img {
        padding: 30px;
    }

    .product-short-desc {
        padding: 20px;
    }

    .quick-specs {
        padding: 20px;
    }

    .product-features {
        padding: 25px;
    }
}
