/* Product Page Modern Design */

/* Main Container */
.product-page-main {
    background-color: var(--primary-color);
    min-height: 100vh;
    overflow-x: hidden;
}

.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Product Layout */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Product Images Section */
.product-images-section {
    position: relative;
}

.main-product-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.thumbnail-images {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.thumbnail-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail-image:hover,
.thumbnail-image.active {
    border-color: var(--primary-soft);
    transform: scale(1.05);
}

/* Product Details Section */
.product-details-section {
    padding: 1rem 0;
}

.brand-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-soft);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-hard);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.product-description {
    font-size: 1rem;
    color: var(--secondary-soft);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Price Section */
.price-section {
    margin-bottom: 1.5rem;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.original-price {
    font-size: 1.2rem;
    color: var(--secondary-soft);
    text-decoration: line-through;
    margin: 0;
}

.current-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-hard);
    margin: 0;
}

.discount-badge {
    background-color: var(--primary-soft);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.shipping-text {
    font-size: 0.9rem;
    color: var(--secondary-soft);
    margin: 0;
}

.shipping-text a {
    color: var(--primary-soft);
    text-decoration: underline;
}

/* Rating Section */
.rating-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    width: 20px;
    height: 20px;
    color: #e5e7eb;
}

.star.filled {
    color: #fbbf24;
}

/* Quantity and Actions */
.quantity-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quantity-and-cart {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 48px;
    border: none;
    background-color: #f9fafb;
    color: var(--secondary-hard);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background-color: #f3f4f6;
}

.quantity-input {
    width: 60px;
    height: 48px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-hard);
    background-color: var(--primary-color);
}

.quantity-input:focus {
    outline: none;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.add-to-cart-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--secondary-hard);
    background-color: var(--primary-color);
    color: var(--secondary-hard);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-to-cart-btn:hover {
    background-color: var(--secondary-hard);
    color: var(--primary-color);
    text-decoration: none;
}

.buy-now-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    background-color: var(--primary-soft);
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buy-now-btn:hover {
    background-color: var(--secondary-hard);
    color: var(--primary-color);
    text-decoration: none;
}

/* Buy Now Section (Below quantity and add to cart) */
.buy-now-section {
    margin-top: 1rem;
    width: 100%;
}

.buy-now-section .buy-now-btn {
    width: 100%;
    max-width: 300px;
}

/* Buy now button within quantity-actions */
.quantity-actions .buy-now-section {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    margin: 1rem 0 0 0;
}

.quantity-actions .buy-now-btn {
    width: 100%;
    text-align: center;
    padding: 0.75rem 1.5rem;
    border: none;
    background-color: var(--primary-soft);
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Override fixed positioning from custom.css */
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    z-index: auto !important;
    /* Match the width of the quantity-and-cart container */
    max-width: none;
}

.quantity-actions .buy-now-btn:hover {
    background-color: var(--secondary-hard);
    color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Collapsible Sections */
.collapsible-sections {
    margin: 2rem 0;
}

.collapsible-item {
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--primary-color);
}

.collapsible-button {
    width: 100%;
    padding: 1rem 1.5rem;
    background-color: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-hard);
    transition: all 0.3s ease;
}

.collapsible-button:hover {
    background-color: #f8f9fa;
}

.collapsible-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.collapsible-button.active .collapsible-icon {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-content.active {
    max-height: 1000px;
}

.collapsible-text {
    padding: 1.5rem 2rem 2rem 2rem;
    color: var(--secondary-soft);
    line-height: 1.7;
    font-size: 0.95rem;
}

.faq-content {
    padding: 1.5rem 2rem 2rem 2rem;
}

.faq-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-question h5 {
    color: var(--secondary-hard);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-soft);
    display: inline-block;
}

.faq-answer p {
    color: var(--secondary-soft);
    margin: 0;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Compare and Share Section */
.compare-share-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: transparent;
    border-radius: 8px;
    border: none;
}

.compare-share-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.compare-btn {
    flex: 0 0 auto;
}

.compare-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    border: 2px solid var(--secondary-hard);
    border-radius: 8px;
    color: var(--secondary-hard);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 120px;
    text-align: center;
}

.compare-link:hover {
    background-color: var(--secondary-hard);
    color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.compare-link img {
    width: 18px;
    height: 18px;
    filter: brightness(0) saturate(100%) invert(20%) sepia(8%) saturate(750%) hue-rotate(169deg) brightness(95%) contrast(88%);
}

.compare-link:hover img {
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%);
}

.compare-link span {
    font-size: 0.9rem;
    font-weight: 600;
}

.share-btn {
    flex: 0 0 auto;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    border: 2px solid var(--secondary-hard);
    border-radius: 8px;
    color: var(--secondary-hard);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 120px;
    text-align: center;
}

.share-button:hover {
    background-color: var(--secondary-hard);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.share-button ion-icon {
    font-size: 18px;
    color: inherit;
}

.share-button span {
    font-weight: 600;
}

.quick_view_share {
    color: var(--secondary-hard) !important;
    font-weight: 600;
    display: inline-block !important;
    min-height: 32px !important;
    vertical-align: middle !important;
}

/* Social sharing icons styling */
.quick_view_share .jssocials-share-link {
    color: var(--secondary-hard) !important;
    background-color: transparent !important;
    border: 1px solid var(--secondary-hard) !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 4px !important;
    transition: all 0.3s ease !important;
}

.quick_view_share .jssocials-share-link:hover {
    background-color: var(--secondary-hard) !important;
    color: var(--primary-color) !important;
    transform: translateY(-2px) !important;
}

.quick_view_share .jssocials-share-link i {
    font-size: 14px !important;
    color: inherit !important;
}

.quick_view_share .jssocials-share-link svg {
    width: 14px !important;
    height: 14px !important;
    fill: currentColor !important;
}

/* Ensure social sharing container is visible */
.quick_view_share {
    display: block !important;
    min-height: 40px !important;
    padding: 8px 0 !important;
}

/* Fallback for when jsSocials doesn't load */
.quick_view_share:empty::after {
    content: "Loading social sharing...";
    color: var(--secondary-soft);
    font-style: italic;
    font-size: 0.9rem;
}

/* Fallback social share links */
.social-share-link {
    display: inline-block;
    color: var(--secondary-hard) !important;
    background-color: transparent !important;
    border: 1px solid var(--secondary-hard) !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    text-align: center !important;
    line-height: 30px !important;
    margin: 0 4px !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.social-share-link:hover {
    background-color: var(--secondary-hard) !important;
    color: var(--primary-color) !important;
    transform: translateY(-2px) !important;
    text-decoration: none !important;
}

/* Zipcode Check Form Styling */
#validate-zipcode-form .form-control,
#validate-city-form .form-control {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#validate-zipcode-form .form-control:focus,
#validate-city-form .form-control:focus {
    border-color: var(--primary-soft);
    box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.25);
    outline: none;
}

#validate-zipcode-form .btn,
#validate-city-form .btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    background-color: var(--primary-soft) !important;
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-soft) !important;
}

#validate-zipcode-form .btn:hover,
#validate-city-form .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-soft) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-soft) !important;
}

#validate-zipcode-form .btn:disabled,
#validate-city-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#error_box,
#error_box_city {
    min-height: 1.5rem;
}

#error_box p,
#error_box_city p {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    padding: 0.5rem 0;
}

/* Responsive adjustments for zipcode form */
@media (max-width: 768px) {
    #validate-zipcode-form .col-md-8,
    #validate-city-form .col-md-8 {
        margin-bottom: 0.5rem;
    }
    
    #validate-zipcode-form .col-md-4,
    #validate-city-form .col-md-4 {
        width: 100%;
    }
    
    /* Quantity and cart responsive */
    .quantity-and-cart {
        flex-direction: row;
        gap: 0.75rem;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }
    
    .quantity-selector {
        flex: 0 0 auto;
        min-width: 120px;
        justify-content: center;
    }
    
    .action-buttons {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }
    
    .add-to-cart-btn {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
    
    .quantity-actions .buy-now-btn {
        width: 100%;
    }
    
    .quantity-actions .buy-now-section {
        justify-content: flex-start;
    }
}

/* Out of Stock Button */
.out-of-stock-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    background-color: #ef4444;
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Collapsible Sections */
.collapsible-sections {
    margin-top: 2rem;
}

.collapsible-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.5rem 0;
}

.collapsible-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-hard);
    margin: 0;
}

.collapsible-icon {
    width: 20px;
    height: 20px;
    color: var(--secondary-soft);
    transition: transform 0.3s ease;
}

.collapsible-icon.rotated {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-content.expanded {
    max-height: 500px;
}

.collapsible-text {
    font-size: 0.95rem;
    color: var(--secondary-soft);
    line-height: 1.6;
    margin: 0;
    padding-top: 0.5rem;
}

/* FAQ Content Styling */
.faq-content {
    padding: 0.5rem 0;
}

.add-faqs-form {
    margin-bottom: 1rem;
}

.add-faqs-form .btn {
    background-color: var(--primary-soft);
    color: var(--primary-color);
    border: 1px solid var(--primary-soft);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.add-faqs-form .btn:hover {
    background-color: var(--secondary-hard);
    color: var(--primary-color);
    border-color: var(--secondary-hard);
}

/* FAQ Accordion Styling */
.accordion-wrapper {
    margin-top: 1rem;
}

.accordion-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background-color: var(--primary-color);
}

.accordion-item:last-child {
    margin-bottom: 0;
}

.accordion-button {
    background-color: transparent;
    border: none;
    padding: 1rem;
    font-weight: 600;
    color: var(--secondary-hard);
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background-color: #f9fafb;
    color: var(--secondary-hard);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-button::after {
    content: '+';
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-soft);
    transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed)::after {
    content: '−';
    transform: rotate(0deg);
}

.card-body {
    padding: 1rem;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.card-body p {
    margin-bottom: 0.5rem;
    color: var(--secondary-soft);
    line-height: 1.6;
}

.card-body p:last-child {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--secondary-hard);
    font-weight: 500;
}

/* Modal Styling */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background-color: var(--primary-soft);
    color: var(--primary-color);
    border-bottom: 1px solid #e5e7eb;
    border-radius: 12px 12px 0 0;
}

.modal-title {
    font-weight: 600;
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0.7;
}

.btn-close:hover {
    opacity: 1;
}

.form-control {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-soft);
    box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25);
}

/* No FAQs Found Styling */
.d-flex.flex-column.align-items-center {
    text-align: center;
    padding: 2rem 0;
}

.d-flex.flex-column.align-items-center img {
    margin-bottom: 1rem;
    opacity: 0.7;
}

.d-flex.flex-column.align-items-center h4 {
    color: var(--secondary-soft);
    font-weight: 500;
    margin: 0;
}

/* Shipping Timeline */
.shipping-timeline {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 2px;
    background-color: #d1d5db;
    z-index: 1;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    position: relative;
    z-index: 2;
}

.timeline-label {
    font-size: 0.8rem;
    color: var(--secondary-hard);
    font-weight: 600;
    margin-top: 0.5rem;
    text-align: center;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--secondary-soft);
    margin-top: 0.25rem;
    text-align: center;
}

/* Share Section */
.share-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.share-text {
    font-size: 0.9rem;
    color: var(--secondary-hard);
    margin: 0;
}

.share-icon {
    width: 16px;
    height: 16px;
    color: var(--secondary-soft);
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .shipping-timeline {
        flex-direction: column;
        gap: 1rem;
    }
    
    .timeline-item:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .product-detail-container {
        padding: 1rem 0.5rem;
    }
    
    .product-title {
        font-size: 1.8rem;
    }
    
    .current-price {
        font-size: 1.5rem;
    }
    
    .quantity-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Override existing styles */
.Product-Detail-card {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.product-img-section-md {
    background: none !important;
}

.product-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    color: var(--secondary-hard) !important;
    margin-bottom: 1rem !important;
}

.price {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    color: var(--secondary-hard) !important;
    margin: 0 !important;
}

.special-price.striped-price {
    font-size: 1.2rem !important;
    color: var(--secondary-soft) !important;
    text-decoration: line-through !important;
}

/* Hide default elements we're replacing */
.product-add-section .input-group {
    display: none !important;
}

.product-add-section .d-flex.gap-2 {
    display: none !important;
}

.delivery-service {
    display: none !important;
}

.compare-share-btn {
    display: none !important;
}

.specification {
    display: none !important;
}

.item-detail {
    display: none !important;
}

/* Related Products Full Width Container */
.related-products-full-width {
    width: 100%;
    background-color: transparent;
    padding: 3rem 0;
    margin-top: 3rem;
    overflow: hidden;
    position: relative;
}

/* Related Products Section */
.related-products-section {
    padding-left: 5rem;
    padding-right: 5rem;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.related-products-header {
    margin-bottom: 2rem;
    text-align: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.related-products-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-hard);
    margin: 0;
}

.related-products-grid {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
}

.related-products-grid::-webkit-scrollbar {
    display: none;
}

.related-products-grid {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Related Product Item Wrapper (card + details) */
.related-product-item-wrapper {
    display: flex;
    flex-direction: column;
    flex: 0 0 280px;
    width: 280px;
}

/* Related Product Card - matching product-listing design */
.related-product-card {
    background: #ffffff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #f5f5f5;
}

.related-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.related-product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Related Product Image Container */
.related-product-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #fafafa;
}

.related-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-product-card:hover .related-product-img {
    transform: scale(1.05);
}

/* Discount Badge */
.related-product-discount {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--primary-soft);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

/* Related Product Details (outside card) */
.related-product-details {
    padding: 0;
    margin-top: 0.5rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
}

.related-product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-hard);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    font-family: 'Poppins', sans-serif;
}

/* Price Section */
.related-product-price-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.related-product-price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-product-current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-hard);
    margin: 0;
}

.related-product-original-price {
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: line-through;
    margin: 0;
}

.related-product-regular-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-hard);
    margin: 0;
}

.related-product-rating {
    display: flex;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.related-product-rating i {
    font-size: 0.875rem;
    color: #fbbf24;
}

.related-product-category {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

/* Add to Cart Button - matching product-listing design */
.related-product-add-cart {
    width: 100%;
    padding: 12px 16px;
    background-color: #ffffff;
    border: 2px solid var(--secondary-hard);
    color: var(--secondary-hard);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    margin-top: auto;
}

.related-product-add-cart:hover {
    background-color: var(--secondary-hard);
    color: #ffffff;
    text-decoration: none;
}

.related-product-add-cart .add-in-cart {
    display: inline;
}

.related-product-add-cart .add-in-cart-icon {
    display: inline;
    margin-left: 0.5rem;
}

/* Favorite Icon for Related Products */
.related-product-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
}

.related-product-favorite .add-to-fav-btn {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.related-product-favorite .add-to-fav-btn .ion-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.related-product-favorite .add-to-fav-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.related-product-favorite .ion-icon {
    font-size: 18px;
    transition: all 0.3s ease;
}

.related-product-favorite .add-to-fav-btn:hover .ion-icon {
    transform: scale(1.2);
}

/* Hover Icons (Compare & Quick View) for Related Products */
.related-product-hover-icons {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 3;
}

.related-product-card:hover .related-product-hover-icons {
    opacity: 1;
    transform: translateY(0);
}

/* Always visible icons on mobile and tablet screens */
@media (max-width: 999px) {
    .related-product-hover-icons {
        opacity: 1;
        transform: translateY(0);
    }
}

.related-product-icon-space {
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-product-icon-space .shuffle-box,
.related-product-icon-space .heart-box {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.related-product-icon-space .heart-box .add-to-fav-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    height: 100%;
}

.related-product-icon-space .shuffle-box:hover,
.related-product-icon-space .heart-box:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.related-product-icon-space .ion-icon {
    font-size: 18px;
    color: var(--secondary-hard);
    transition: all 0.3s ease;
}

.related-product-icon-space .shuffle-box:hover .ion-icon,
.related-product-icon-space .heart-box:hover .ion-icon {
    color: var(--primary-soft);
    transform: scale(1.2);
}

.related-products-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

/* Responsive Design for Related Products */
@media (max-width: 1200px) {
    .related-products-section {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

@media (max-width: 768px) {
    .related-products-full-width {
        padding: 2rem 0;
        width: 100%;
    }
    
    .related-products-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .related-products-title {
        font-size: 1.5rem;
    }
    
    .related-products-grid {
        gap: 1rem;
        padding-bottom: 0.5rem;
    }
    
    .related-product-item-wrapper {
        flex: 0 0 200px;
        width: 200px;
    }
    
    .related-product-image {
        height: 200px; /* Make square - same as width */
    }
    
    .related-product-details {
        padding: 0.75rem;
        min-height: 100px;
    }
    
    .related-product-name {
        font-size: 0.9rem;
        line-height: 1.3;
        margin-bottom: 0.25rem;
    }
    
    .related-product-category {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }
    
    .related-product-current-price,
    .related-product-regular-price {
        font-size: 1rem;
    }
    
    .related-product-original-price {
        font-size: 0.85rem;
    }
    
    .related-product-add-cart {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .related-products-full-width {
        padding: 1.5rem 0;
        width: 100%;
    }
    
    .related-products-section {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .related-products-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .related-products-grid {
        gap: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .related-product-item-wrapper {
        flex: 0 0 160px;
        width: 160px;
    }
    
    .related-product-image {
        height: 160px; /* Make square - same as width */
    }
    
    .related-product-details {
        padding: 0.5rem;
        min-height: 90px;
    }
    
    .related-product-name {
        font-size: 0.8rem;
        line-height: 1.2;
        margin-bottom: 0.25rem;
    }
    
    .related-product-category {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .related-product-current-price,
    .related-product-regular-price {
        font-size: 0.9rem;
    }
    
    .related-product-original-price {
        font-size: 0.8rem;
    }
    
    .related-product-add-cart {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    /* Mobile Icon Adjustments */
    .related-product-favorite {
        top: 6px;
        right: 6px;
    }
    
    .related-product-favorite .add-to-fav-btn {
        width: 28px;
        height: 28px;
    }
    
    .related-product-favorite .ion-icon {
        font-size: 14px;
    }
    
    .related-product-hover-icons {
        top: 6px;
        left: 6px;
        gap: 4px;
    }
    
    .related-product-icon-space .shuffle-box,
    .related-product-icon-space .heart-box {
        width: 28px;
        height: 28px;
    }
    
    .related-product-icon-space .ion-icon {
        font-size: 14px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .related-product-item-wrapper {
        flex: 0 0 140px;
        width: 140px;
    }
    
    .related-product-image {
        height: 140px; /* Make square - same as width */
    }
    
    .related-product-details {
        padding: 0.4rem;
        min-height: 80px;
    }
    
    .related-product-name {
        font-size: 0.75rem;
        line-height: 1.1;
    }
    
    .related-product-category {
        font-size: 0.7rem;
    }
    
    .related-product-current-price,
    .related-product-regular-price {
        font-size: 0.85rem;
    }
    
    .related-product-original-price {
        font-size: 0.75rem;
    }
    
    .related-product-add-cart {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
}
