/**
 * Product Details - Responsive Design
 * Contains: Media queries for all screen sizes (desktop, tablet, mobile)
 * Part of modular product-details.css split
 */

/* Desktop Large */
@media (min-width: 1025px) {
    .product-main-container {
        padding: 40px;
    }

    .main-image-container {
        height: 480px;
    }

    .thumbnail-gallery {
        grid-auto-columns: 90px;
        gap: 18px;
    }

    .thumbnail {
        width: 90px;
        height: 90px;
    }
}

@media (min-width: 1200px) {
    .main-image-container {
        height: 560px;
    }

    .thumbnail-gallery {
        grid-auto-columns: 100px;
        gap: 20px;
    }

    .thumbnail {
        width: 100px;
        height: 100px;
    }
}

@media (min-width: 1400px) {
    .main-image-container {
        height: 610px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .container {
        max-width: 100% !important;
        width: 100%;
        padding: 0 15px !important;
    }

    .product-main-container {
        padding: 20px;
        margin: 15px auto;
    }

    /* Stack columns vertically on tablet */
    .product-main-container .row {
        display: flex !important;
        flex-direction: column !important;
    }

    .product-main-container .col-lg-6 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding: 0 !important;
    }

    /* Image gallery on tablet */
    .main-image-container {
        width: 100% !important;
        height: auto !important;
        margin: 0 auto 20px auto !important;
        overflow: visible !important;
        border: 1px solid #e0e0e0 !important;
    }

    .main-image {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
    }

    .thumbnail-gallery {
        justify-content: center !important;
        margin-bottom: 25px !important;
    }

    .thumbnail {
        width: 70px !important;
        height: 70px !important;
    }

    .product-info {
        padding-left: 0;
        padding: 0 10px !important;
    }

    .product-title {
        font-size: 26px !important;
    }

    .category-tag {
        font-size: 12px !important;
    }

    .rating-wrapper {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .write-review-btn {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }

    /* Price section tablet */
    .price-section {
        padding: 15px !important;
    }

    .current-price {
        font-size: 28px !important;
    }

    .original-price {
        font-size: 18px !important;
    }

    /* Quantity controls tablet */
    .quantity-section {
        padding: 10px !important;
    }

    .qty-btn {
        width: 40px !important;
        height: 40px !important;
    }

    #quantity {
        width: 60px !important;
        height: 40px !important;
    }

    /* Action buttons tablet */
    .action-buttons {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .action-buttons .btn {
        width: 100% !important;
    }

    /* Features section tablet */
    .product-features {
        flex-wrap: wrap !important;
        gap: 15px !important;
    }

    .product-features .feature {
        flex: 0 0 45% !important;
    }

    .features-separator {
        display: none !important;
    }

    /* Sections tablet */
    .product-section {
        padding: 20px !important;
        margin-bottom: 15px !important;
    }

    .section-header {
        flex-wrap: nowrap !important;
        gap: 10px !important;
    }

    .btn-write-review-header {
        width: auto !important;
        margin-top: 0 !important;
        white-space: nowrap !important;
    }

    /* Reviews tablet */
    .rating-overview {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .rating-bars {
        width: 100% !important;
    }

    .related-products-container {
        padding: 0 !important;
        margin: 15px auto 10px auto;
    }

    /* Related products grid - 3 columns on tablet */
    .related-products-container .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .breadcrumb-wrapper {
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin-left: -20px !important;
        margin-right: -20px !important;
        margin-top: -20px !important;
    }

    .product-main-container {
        padding: 0 !important;
        margin: 0 !important;
    }

    .product-info {
        padding: 0 !important;
    }

    .product-title {
        font-size: 24px !important;
    }

    .price-section {
        padding: 12px 8px !important;
        margin-bottom: 5px !important;
        background: white !important;
        display: block !important;
    }

    .price-row {
        margin-bottom: 5px !important;
        gap: 8px !important;
    }

    .current-price {
        font-size: 24px !important;
    }

    .original-price {
        font-size: 16px !important;
    }

    .savings {
        font-size: 12px !important;
        padding: 4px 8px !important;
    }

    .quantity-section {
        margin: 0 0 15px 0 !important;
        padding: 8px !important;
        background: white !important;
        flex-direction: row !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .quantity-section::before {
        content: 'Quantity: ' !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
    }

    .qty-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 14px !important;
    }

    #quantity {
        width: 50px !important;
        height: 35px !important;
        font-size: 14px !important;
    }

    .stock-info {
        font-size: 12px !important;
        padding-right: 0 !important;
        margin-left: auto !important;
    }

    .action-buttons {
        margin: 8px 0 !important;
        padding: 0 8px !important;
    }

    .product-features {
        flex-direction: column;
        gap: 12px;
        padding: 12px 0 !important;
        margin: 12px 0 !important;
    }

    .product-features .feature {
        font-size: 14px !important;
        gap: 8px !important;
    }

    .product-features .feature i {
        font-size: 16px !important;
    }

    .product-features .feature span {
        font-size: 14px !important;
    }

    .features-separator {
        display: none;
    }

    .rating-overview {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .overall-score {
        flex-shrink: unset !important;
        min-width: unset !important;
    }

    .modern-reviews-summary {
        padding: 0 !important;
        margin: 15px 0 !important;
    }

    .modern-reviews-list {
        padding: 0 !important;
    }

    /* Related Products Mobile - 2 columns (following shop page styles) */
    .related-products-container .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .related-products-container .product-card-ultimate {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
    }

    .related-products-container .product-image-wrapper {
        height: 140px !important;
        flex-shrink: 0 !important;
    }

    .related-products-container .card-content {
        padding: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        flex-grow: 1 !important;
        min-height: 140px !important;
    }

    /* Add to cart button - keep text and icon on one line */
    .related-products-container .add-to-cart-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        gap: 6px !important;
        font-size: 11px !important;
        padding: 10px 8px !important;
    }

    .related-products-container .card-category {
        font-size: 0.75rem !important;
        margin-bottom: 3px !important;
        text-align: left;
    }

    [dir="rtl"] .related-products-container .card-category {
        text-align: right !important;
        direction: rtl !important;
    }

    .related-products-container .card-title {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        margin-bottom: 5px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        height: auto !important;
    }

    .related-products-container .card-rating {
        margin-bottom: 6px !important;
        font-size: 0.8rem !important;
    }

    .related-products-container .card-price-section {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        margin: 5px 0 !important;
        min-height: 32px !important;
        justify-content: flex-start !important;
    }

    .related-products-container .price-current,
    .related-products-container .price-original {
        font-size: 0.65rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.2 !important;
    }

    .related-products-container .price-discount {
        display: none !important;
    }

    .related-products-container {
        padding: 0 !important;
        margin: 10px auto;
    }

    /* FAQ Mobile */
    .faq-accordion-container {
        padding: 0;
    }

    .faq-accordion-item {
        margin-bottom: 12px;
        border-radius: 8px;
    }

    .faq-accordion-header {
        padding: 16px 20px;
        gap: 12px;
    }

    .faq-question-badge {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .faq-question-text {
        font-size: 15px;
    }

    .faq-answer-wrapper {
        padding: 20px 20px 20px 60px;
    }

    .faq-answer-text {
        font-size: 14px;
    }

    /* Product Cards Mobile */
    .card-image-container {
        height: 250px;
    }

    .card-image {
        width: 100%;
        height: 100%;
        object-fit: cover !important;
    }

    .list-view {
        flex-direction: column;
    }

    .list-view .card-image-container {
        width: 100%;
        height: 250px;
    }

    .list-view .card-footer {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .list-view .card-actions {
        flex-direction: column;
        width: 100%;
    }

    .list-view .add-to-cart-btn,
    .view-details-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile Small */
@media (max-width: 576px) {
    .product-main-container {
        padding: 15px;
        margin: 10px auto;
    }

    .breadcrumb-wrapper {
        margin-left: -15px !important;
        margin-right: -15px !important;
        margin-top: -15px !important;
        padding: 12px 15px !important;
    }

    .breadcrumb {
        margin-top: 25px !important;
    }

    .product-title {
        font-size: 20px !important;
    }

    .current-price {
        font-size: 28px !important;
    }

    .btn-primary,
    .btn-add-to-cart-black {
        height: 40px !important;
        padding: 0 !important;
        font-size: 14px !important;
    }

    .product-features {
        gap: 10px;
        padding: 10px 0 !important;
        margin: 10px 0 !important;
    }

    .related-products-container {
        padding: 0 !important;
        margin: 10px auto;
    }

    /* FAQ Mobile Small */
    .faq-accordion-header {
        padding: 12px;
        gap: 8px;
    }

    .faq-question-badge {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .faq-question-text {
        font-size: 13px;
    }

    .faq-toggle-icon {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }

    .faq-answer-wrapper {
        padding: 12px;
        padding-left: 40px;
    }
}

/* Mobile Only - 767px and below */
@media (max-width: 767px) {
    /* Section header - stack title and button vertically on mobile only */
    .section-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    .section-header .btn-write-review-header {
        width: 100% !important;
        margin-left: 0 !important;
        display: block !important;
        text-align: center !important;
    }

    .btn-write-review-header {
        width: 100% !important;
        display: block !important;
    }
}
