/* ============================================
   Product View Page - Modern Design
   ============================================ */

/* ============================================
   Main Container & Layout
   ============================================ */
.main.shop {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    padding-top: 2rem;
    padding-bottom: 3rem;
    min-height: calc(100vh - 200px);
}

.main.shop .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Breadcrumb Enhancement */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
}

.breadcrumb li {
    font-size: 14px;
    color: #6c757d;
}

.breadcrumb li a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb li a:hover {
    color: #0056b3;
}

/* ============================================
   Product Images Section - Enhanced with Zoom
   ============================================ */
.thumb-gallery-wrapper {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.thumb-gallery-wrapper:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

/* Main Product Image */
.thumb-gallery-detail {
    position: relative;
    margin-bottom: 1.5rem;
    cursor: zoom-in;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fa;
}

.thumb-gallery-detail .ratio {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.thumb-gallery-detail img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.thumb-gallery-detail:hover img {
    transform: scale(1.1);
}

/* Image Zoom Modal */
.image-zoom-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    cursor: zoom-out;
    align-items: center;
    justify-content: center;
}

.image-zoom-overlay.active {
    display: flex;
}

.image-zoom-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Thumbnail Images */
.thumb-gallery-thumbs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.thumb-gallery-thumbs .ratio {
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    max-width: 90px;
    flex: 0 0 90px;
}

.thumb-gallery-thumbs .ratio:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.thumb-gallery-thumbs .ratio.active {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.thumb-gallery-thumbs img {
    transition: transform 0.3s ease;
}

.thumb-gallery-thumbs .ratio:hover img {
    transform: scale(1.1);
}

/* ============================================
   Product Details Section
   ============================================ */
.summary.entry-summary {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.summary.entry-summary h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.summary.entry-summary .divider {
    margin: 1.5rem 0;
}

.summary.entry-summary .divider hr {
    border-color: #e9ecef;
    opacity: 1;
}

/* Price Section */
.summary.entry-summary .price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.summary.entry-summary .price .sale {
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
}

.summary.entry-summary .price .amount {
    font-size: 1.25rem;
    color: #6c757d;
    text-decoration: line-through;
}

.summary.entry-summary .price .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Description */
.summary.entry-summary p {
    font-size: 1rem;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 1rem;
}

.summary.entry-summary p.text-muted {
    color: #6c757d;
    font-size: 0.9375rem;
}

/* ============================================
   Product Features - Icons Section
   ============================================ */
.product-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.product-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.product-feature:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.product-feature-text {
    display: flex;
    flex-direction: column;
}

.product-feature-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #212529;
    margin: 0;
}

.product-feature-subtitle {
    font-size: 0.75rem;
    color: #6c757d;
    margin: 0;
}

/* ============================================
   Add to Cart Form - Enhanced
   ============================================ */
.summary.entry-summary .cart {
    margin: 2rem 0;
}

.summary.entry-summary .cart table {
    margin-bottom: 1.5rem;
}

.summary.entry-summary .cart table td {
    padding: 0.75rem 0;
    vertical-align: middle;
}

.summary.entry-summary .cart table td:first-child {
    font-weight: 600;
    color: #495057;
    font-size: 0.9375rem;
    width: 120px;
}

.summary.entry-summary .cart .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.summary.entry-summary .cart .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

.summary.entry-summary .cart .form-select:hover {
    border-color: #ced4da;
}

/* Add to Cart Button - Enhanced CTA */
.summary.entry-summary .cart #addToCartBtn {
    width: 100%;
    max-width: 400px;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.summary.entry-summary .cart #addToCartBtn:not(:disabled) {
    cursor: pointer;
}

.summary.entry-summary .cart #addToCartBtn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

.summary.entry-summary .cart #addToCartBtn:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.summary.entry-summary .cart #addToCartBtn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
}

.summary.entry-summary .cart #addToCartBtn:not(:disabled)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.summary.entry-summary .cart #addToCartBtn:not(:disabled):active::before {
    width: 300px;
    height: 300px;
}

/* Buy Now Button (Alternative) */
.buy-now-btn {
    width: 100%;
    max-width: 400px;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid #28a745;
    border-radius: 8px;
    background: #fff;
    color: #28a745;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.buy-now-btn:hover {
    background: #28a745;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.3);
}

/* ============================================
   Social Share & Wishlist
   ============================================ */
.product-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.social-icons {
    display: flex;
    gap: 0.5rem;
}

.social-icons li {
    margin: 0;
}

.social-icons li a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
    color: #495057;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.social-icons li a:hover {
    background: #007bff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    border-color: #007bff;
}

.wishlist-btn-product {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wishlist-btn-product:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    background: #fff5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}

.wishlist-btn-product.active,
.wishlist-btn-product.active:hover {
    border-color: #e74c3c;
    background: #e74c3c;
    color: #fff;
}

/* ============================================
   Product Table (Available Options)
   ============================================ */
#productTableContainer {
    margin-top: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
}

#productTableContainer h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
}

#productTableContainer .table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

#productTableContainer .table thead {
    background: #f8f9fa;
}

#productTableContainer .table thead th {
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding: 1rem;
}

#productTableContainer .table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* ============================================
   Tabs Section
   ============================================ */
.tabs-product {
    margin-top: 3rem;
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.tabs-product .nav-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.tabs-product .nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    padding: 1rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
}

.tabs-product .nav-tabs .nav-link:hover {
    border-bottom-color: #007bff;
    color: #007bff;
    background: #f8f9fa;
}

.tabs-product .nav-tabs .nav-link.active {
    border-bottom-color: #007bff;
    color: #007bff;
    background: transparent;
}

.tabs-product .tab-content {
    padding: 1rem 0;
}

.tabs-product .tab-pane {
    font-size: 1rem;
    line-height: 1.8;
    color: #495057;
}

.tabs-product .tab-pane table {
    width: 100%;
}

.tabs-product .tab-pane table th {
    font-weight: 600;
    color: #495057;
    padding: 0.75rem;
    width: 200px;
}

.tabs-product .tab-pane table td {
    padding: 0.75rem;
    color: #6c757d;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 991px) {
    .main.shop .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .thumb-gallery-wrapper {
        margin-bottom: 2rem;
    }

    .summary.entry-summary {
        padding: 1.5rem;
    }

    .summary.entry-summary h1 {
        font-size: 1.75rem;
    }

    .summary.entry-summary .price .sale {
        font-size: 1.75rem;
    }

    .product-features {
        grid-template-columns: 1fr;
    }

    .product-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767px) {
    .main.shop {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }

    .summary.entry-summary {
        padding: 1rem;
    }

    .summary.entry-summary h1 {
        font-size: 1.5rem;
    }

    .summary.entry-summary .price {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .summary.entry-summary .price .sale {
        font-size: 1.5rem;
    }

    .thumb-gallery-thumbs {
        gap: 0.5rem;
    }

    .thumb-gallery-thumbs .ratio {
        max-width: 70px;
        flex: 0 0 70px;
    }

    .summary.entry-summary .cart #addToCartBtn,
    .buy-now-btn {
        width: 100%;
    }

    .tabs-product {
        padding: 1rem;
    }

    .tabs-product .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 575px) {
    .breadcrumb {
        font-size: 0.875rem;
    }

    .thumb-gallery-wrapper {
        padding: 1rem;
    }

    .summary.entry-summary h1 {
        font-size: 1.25rem;
    }

    .summary.entry-summary .price .sale {
        font-size: 1.25rem;
    }

    .social-icons li a {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }

    .product-feature {
        padding: 0.5rem;
    }

    .product-feature-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* ============================================
   Animation & Transitions
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.summary.entry-summary {
    animation: fadeIn 0.6s ease-out;
}

.thumb-gallery-wrapper {
    animation: fadeIn 0.6s ease-out 0.1s backwards;
}

.tabs-product {
    animation: fadeIn 0.6s ease-out 0.2s backwards;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Fix for Bootstrap gap utility compatibility */
.d-flex.flex-column.gap-3 {
    gap: 1rem !important;
}

/* ============================================
   Button Improvements
   ============================================ */
.summary.entry-summary .cart #addToCartBtn i,
.buy-now-btn i {
    transition: transform 0.3s ease;
}

.summary.entry-summary .cart #addToCartBtn:not(:disabled):hover i,
.buy-now-btn:hover i {
    transform: scale(1.1);
}

/* ============================================
   Loading State
   ============================================ */
.summary.entry-summary .cart #addToCartBtn.loading,
.buy-now-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.summary.entry-summary .cart #addToCartBtn.loading::after,
.buy-now-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* ============================================
   Accessibility Improvements
   ============================================ */
.summary.entry-summary .cart #addToCartBtn:focus,
.buy-now-btn:focus,
.wishlist-btn-product:focus,
.social-icons li a:focus {
    outline: 3px solid rgba(0, 123, 255, 0.5);
    outline-offset: 2px;
}

/* Skip to content for screen readers */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 999;
}

.skip-to-content:focus {
    left: 6px;
    top: 7px;
    padding: 8px 16px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .summary.entry-summary,
    .thumb-gallery-wrapper,
    .tabs-product {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

