/* ==========================================
   EASYPARA PRODUCT DETAIL STYLES - MASTER REDESIGN
   ========================================== */

:root {
    --primary-teal: #008B8B;
    --primary-teal-dark: #006666;
    --secondary-coral: #FF7F50;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-light: #f8fafc;
    --border-light: #f1f5f9;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Base Spacing & Breadcrumb */
.breadcrumb-section {
    background-color: transparent;
    padding: 1.5rem 0 0.75rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.breadcrumb-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--primary-teal);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

/* Main Grid Layout */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 5rem;
    align-items: flex-start;
    margin-bottom: 5rem;
}

/* Gallery - Vertical Layout */
.gallery-layout-vertical {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
}

.thumbnail-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thumbnail-btn {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 2px solid transparent;
    padding: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
}

.thumbnail-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail-btn.active {
    border-color: var(--primary-teal);
    box-shadow: var(--shadow-md);
}

.main-image-wrapper {
    position: relative;
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-light);
}

.main-image {
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-image:hover img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--secondary-coral);
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 10px 20px rgba(255, 127, 80, 0.2);
}

/* Product Info & Sticky Column */
.product-info-column {
    height: 100%;
}

.sticky-info-wrapper {
    position: sticky;
    top: 100px;
}

.product-brand-tag {
    color: var(--primary-teal);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
}

.product-title-enhanced {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.product-rating-simple {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.product-rating-simple .stars {
    color: #fbbf24;
    font-size: 0.9rem;
}

.product-rating-simple .count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: underline;
}

/* Price & Action Box */
.price-action-box {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--border-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    margin-bottom: 2rem;
}

.product-price-large {
    margin-bottom: 2rem;
}

.current-price {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -2px;
}

.price-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.old-price {
    font-size: 1.25rem;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.savings-amount {
    background: #fef2f2;
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
}

/* Integrated Actions */
.product-actions-integrated {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1.5rem;
}

/* Quantity and wishlist row */
.product-actions-integrated .quantity-wishlist-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.product-actions-integrated .quantity-wishlist-row .quantity-pill {
    flex: 1;
}

/* Buttons take full width */
.product-actions-integrated .btn-buy-primary,
.product-actions-integrated .btn-buy-now,
.product-actions-integrated .btn-buy-primary.disabled {
    width: 100%;
}

@media (max-width: 768px) {
    .product-actions-integrated {
        grid-template-columns: 1fr;
        gap: 10px;
    }

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

    .product-actions-integrated .btn-buy-primary.disabled,
    .product-actions-integrated .btn-buy-now.disabled {
        grid-column: auto;
    }
}

.quantity-pill {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: 16px;
    padding: 4px;
    width: 70px;
    border: 1px solid var(--border-light);
}

.qty-control {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: none;
    background: white;
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.qty-control:hover:not(:disabled) {
    background: var(--primary-teal);
    color: white;
}

.qty-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#quantity {
    flex: 1;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    width: 30px;
}

#quantity:disabled {
    opacity: 0.5;
}

.btn-buy-primary {
    background: var(--primary-teal);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 54px;
}

.btn-buy-primary:hover:not(.disabled) {
    background: var(--primary-teal-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 139, 139, 0.2);
}

.btn-buy-primary.disabled {
    background: #e9ecef !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

.btn-buy-now {
    background: linear-gradient(135deg, #ff8c00 0%, #ffa500 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
    height: 54px;
}

.btn-buy-now:hover:not(.disabled) {
    background: linear-gradient(135deg, #ff7700 0%, #ff9500 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 140, 0, 0.4);
}

.btn-buy-now.disabled {
    background: #e9ecef !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

.btn-buy-now i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {

    .btn-buy-primary,
    .btn-buy-now {
        width: 100%;
        font-size: 0.95rem;
    }
}


.btn-wishlist-circle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-wishlist-circle:hover {
    color: var(--secondary-coral);
    border-color: var(--secondary-coral);
    background: #fffafa;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.stock-status.in-stock {
    color: #10b981;
}

.stock-status.out-of-stock {
    color: #ef4444;
}

.stock-low {
    color: var(--secondary-coral);
    font-weight: 700;
}

/* Minimal description and trust */
.minimal-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 3px solid var(--border-light);
}

.trust-features-minimal {
    display: flex;
    gap: 30px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.trust-item i {
    color: var(--primary-teal);
    font-size: 1.1rem;
}

/* Tabs Redesign */
.product-details-tabs {
    padding: 5rem 0;
    border-top: 1px solid var(--border-light);
}

.tab-buttons {
    display: flex;
    gap: 40px;
    margin-bottom: 3rem;
    justify-content: center;
}

.tab-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 0 0 10px;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.tab-btn.active {
    color: var(--primary-teal);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-teal);
    transition: width 0.3s;
}

.tab-btn.active::after {
    width: 100%;
}

.tab-pane {
    max-width: 800px;
    margin: 0 auto;
    display: none;
    line-height: 1.8;
}

.tab-pane.active {
    display: block;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Related Products Grid */
.related-products-section {
    padding: 6rem 0;
    background: var(--bg-light);
}

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

/* Loading State Support */
.product-btn.is-loading,
.btn-buy-primary.is-loading,
.btn-wishlist-circle.is-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.product-btn.is-loading::after,
.btn-buy-primary.is-loading::after,
.btn-wishlist-circle.is-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

.btn-wishlist-circle.is-loading::after {
    border-top-color: var(--primary-teal);
    border-color: rgba(0, 139, 139, 0.2);
}

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

/* Mobile Adjustments */
@media (max-width: 1024px) {
    .product-detail-grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 3rem;
    }
}

@media (max-width: 991px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .sticky-info-wrapper {
        position: static;
    }

    .gallery-layout-vertical {
        grid-template-columns: 1fr;
    }

    .thumbnail-list-vertical {
        display: none;
        /* Slider behavior better on mobile */
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Related Products Grid */
.related-products-section {
    padding: 6rem 0;
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
}

.related-products-section .section-header {
    margin-bottom: 3.5rem;
    text-align: center;
}

.related-products-section .section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

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

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

.related-products-section .product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    height: 100%;
}

.related-products-section .product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-teal);
}

.related-products-section .product-image {
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.related-products-section .product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.related-products-section .product-card:hover .product-image img {
    transform: scale(1.1);
}

.related-products-section .product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-products-section .product-brand {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--primary-teal);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.related-products-section .product-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3rem;
}

.related-products-section .product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.related-products-section .current-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-teal);
}

.related-products-section .old-price {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.related-products-section .product-actions {
    padding: 0 1.5rem 1.5rem;
}

.related-products-section .product-btn {
    width: 100%;
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.related-products-section .product-btn:hover {
    background: var(--primary-teal);
    color: white;
    border-color: var(--primary-teal);
}

/* Mobile Adjustments */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .related-products-section .section-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}