/**
 * Product Widget Styles
 * Styles for the SecureHoliday product widget component
 * Designed to match the Clos du Blavet website aesthetic
 */

.product-widget-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 2rem;
    cursor: pointer;
}

.product-widget {
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    display: grid;
    grid-template-columns: 250px 1fr;
    height: 100%;
    min-height: 300px;
    transition: box-shadow 0.3s ease;
}

.product-widget-link:hover .product-widget {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.product-widget.error {
    padding: 2rem;
    text-align: center;
    color: #d32f2f;
}

/* Product Image Slider */
.product-image-slider {
    position: relative;
    width: 250px;
    height: 100%;
    min-height: 100px;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px 0 0 8px;
}

.slider-images {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slider-image.active {
    opacity: 1;
    z-index: 1;
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.15), transparent);
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.product-widget-link:hover .slider-prev,
.product-widget-link:hover .slider-next {
    opacity: 1;
}

.slider-prev {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.2), transparent);
    justify-content: flex-start;
    padding-left: 8px;
}

.slider-next {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.2), transparent);
    justify-content: flex-end;
    padding-right: 8px;
}

.slider-prev:hover,
.slider-next:hover {
    background: linear-gradient(to right, rgba(66, 174, 224, 0.4), transparent);
}

.slider-next:hover {
    background: linear-gradient(to left, rgba(66, 174, 224, 0.4), transparent);
}

.slider-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.slider-dot.active {
    background: white;
    transform: scale(1.2);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.product-details {
    padding: 0.7rem 0.9rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    margin: 0 0 0.4rem 0;
    font-size: 1.5rem !important;
    text-align: left !important;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0;
    line-height: 1.2;
}

.product-rating {
    color: #ffa726;
    margin-bottom: 0;
    margin-right: 1.25rem;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
}

.product-rating .rating-number {
    color: #777;
    font-size: 0.95rem;
    margin-left: 0.3rem;
}

.product-info {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 0;
    border: none;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.info-icon {
    font-size: 1.15rem;
}

.info-text {
    color: #444;
    font-size: 1rem;
    font-weight: 500;
}

.product-equipments {
    margin-bottom: 0;
}

.product-equipments h4 {
    margin: 0 0 0.3rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.equipment-list {
    list-style: none;
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.equipment-list li {
    padding: 0;
    font-size: 1.1rem;
    color: #555;
    background: #f8f9fa;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    list-style: none;
    list-style-type: none;
}

.equipment-list li:before {
    content: "" !important;
}

.equipment-list li.more {
    color: #777;
    font-style: italic;
}

.equipment-list li.more:before {
    content: "";
}

.product-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0;
    margin-top: auto;
}

.product-widget .btn {
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    border: none;
    font-size: 13px;
    display: inline-block;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.btn-wrapper {
    display: inline-block;
    min-height: 50px;
}

.product-widget .btn-primary {
    background-image: linear-gradient(-90deg, #42aee0, #70c4eb);
    color: white;
    border-bottom: 5px solid #0078a2;
    transition: all 0.3s ease;
}

.product-widget .btn-primary:hover {
    transform: translateY(3px);
    border-bottom: 2px solid #0078a2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.product-widget .btn-secondary {
    background-image: linear-gradient(-90deg, #8b6d51, #a8876a);
    color: white;
    border-bottom: 5px solid #5c4635;
    transition: all 0.3s ease;
}

.product-widget .btn-secondary:hover {
    transform: translateY(3px);
    border-bottom: 2px solid #5c4635;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .product-widget {
        grid-template-columns: 1fr;
        border-radius: 8px;
    }
    
    .product-image-slider {
        width: 100%;
        height: 150px;
        min-height: 150px;
        border-radius: 8px 8px 0 0;
    }
    
    .product-details {
        padding: 0.75rem;
    }
    
    .product-name {
        font-size: 1rem;
    }
    
    .product-info {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .equipment-list {
        flex-wrap: wrap;
    }
    
    .slider-prev,
    .slider-next {
        width: 28px;
        height: 28px;
        font-size: 1.1rem;
    }
    
    .slider-prev {
        left: 8px;
    }
    
    .slider-next {
        right: 8px;
    }
}

/* Product Info Button */
.product-info-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    margin-top: 0.5rem;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-info-btn:hover {
    background: #f8f9fa;
    border-color: #42aee0;
    color: #42aee0;
}

.product-info-btn .info-icon {
    font-size: 1rem;
}

/* Product Modal */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(3px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.product-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 1100px;
    width: 100%;
    max-height: 95vh;
    overflow: hidden;
    padding: 0;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Top Section - Two columns on desktop, single column on mobile */
.modal-top-section {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    flex-shrink: 0;
}

/* Modal Image Carousel */
.modal-image-carousel {
    position: relative;
    width: 100%;
    min-height: 450px;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 12px 0 0 0;
}

.modal-slider-images {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 450px;
    min-height: inherit;
}

.modal-slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal-slider-image.active {
    opacity: 1;
    z-index: 1;
}

.modal-slider-prev,
.modal-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    padding: 12px 16px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.modal-slider-prev:hover,
.modal-slider-next:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.modal-slider-prev {
    left: 12px;
}

.modal-slider-next {
    right: 12px;
}

.modal-slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.modal-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.modal-slider-dot.active {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.product-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f5f5f5;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10001;
    line-height: 1;
}

.product-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.modal-info-section {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: white;
}

.modal-body-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem 2rem 2rem;
    border-top: 1px solid #e0e0e0;
}

.product-modal-content h2 {
    margin: 0;
    font-size: 2rem;
    color: #1a1a1a;
    padding-right: 3rem;
    line-height: 1.3;
}

.modal-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal-rating .rating-stars {
    color: #ffa726;
    font-size: 1.4rem;
}

.modal-rating .rating-score {
    color: #777;
    font-size: 1.1rem;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.modal-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modal-info-item strong {
    font-size: 1rem;
    color: #666;
}

.modal-info-item span {
    font-size: 1.25rem;
    color: #1a1a1a;
    font-weight: 500;
}

.modal-short-description {
    color: #555;
    line-height: 1.6;
    font-size: 1.05rem;
}

.modal-description {
    margin-bottom: 1rem;
}

.modal-description h3 {
    font-size: 1.35rem;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
}

.modal-description p,
.modal-description div {
    color: #555;
    line-height: 1.6;
    font-size: 1.1rem;
}

.modal-equipments {
    margin-bottom: 1rem;
}

.modal-equipments h3 {
    font-size: 1.35rem;
    color: #1a1a1a;
    margin: 0 0 0.75rem 0;
}

.modal-equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.modal-equipment-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 1.15rem;
    color: #444;
}

.modal-equipment-item .checkmark {
    color: #42aee0;
    font-weight: bold;
    font-size: 1.2rem;
}

.modal-top-section .modal-actions {
    margin-top: auto;
    padding-top: 0;
}

.modal-body-content .modal-actions {
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid #e0e0e0;
}

.modal-actions {
    display: flex;
    justify-content: center;
}

.modal-actions .btn {
    padding: 12px 32px;
    font-size: 1rem;
}

/* Tablet responsive adjustments */
@media (max-width: 992px) {
    .modal-top-section {
        grid-template-columns: 1fr;
    }
    
    .modal-image-carousel {
        min-height: 380px;
        height: 380px;
        border-radius: 12px 12px 0 0;
    }
    
    .modal-slider-images {
        min-height: 380px;
    }
    
    .modal-info-section {
        border-top: 1px solid #e0e0e0;
    }
    
    .modal-equipment-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .modal-top-section {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    
    .product-modal-content {
        padding: 0;
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .modal-image-carousel {
        min-height: 280px;
        height: 280px;
        width: 100%;
    }
    
    .modal-slider-images {
        min-height: 280px;
    }
    
    .modal-info-section {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        text-align: left;
    }
    
    .modal-body-content {
        padding: 0.75rem 1rem 1rem 1rem;
    }
    
    .product-modal-content h2 {
        font-size: 1.2rem;
        padding-right: 2.5rem;
        line-height: 1.2;
    }
    
    .modal-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        padding: 0.6rem;
        gap: 0.5rem;
    }
    
    .modal-info-item strong {
        font-size: 0.85rem;
    }
    
    .modal-info-item span {
        font-size: 1.05rem;
    }
    
    .modal-equipment-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-slider-prev,
    .modal-slider-next {
        padding: 8px 12px;
        font-size: 1.2rem;
    }
    
    .modal-slider-prev {
        left: 8px;
    }
    
    .modal-slider-next {
        right: 8px;
    }
    
    .modal-slider-dots {
        bottom: 12px;
        gap: 6px;
    }
    
    .modal-slider-dot {
        width: 10px;
        height: 10px;
    }
    
    .modal-rating {
        flex-wrap: wrap;
    }
    
    .modal-rating .rating-stars {
        font-size: 1.2rem;
    }
    
    .modal-rating .rating-score {
        font-size: 1rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .modal-top-section {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    
    .product-modal {
        padding: 0.25rem;
    }
    
    .product-modal-content {
        max-height: 98vh;
        border-radius: 6px;
    }
    
    .modal-image-carousel {
        min-height: 220px;
        height: 220px;
        width: 100%;
    }
    
    .modal-slider-images {
        min-height: 220px;
    }
    
    .modal-info-section {
        padding: 0.6rem 0.75rem;
        gap: 0.4rem;
    }
    
    .modal-body-content {
        padding: 0.5rem 0.75rem 0.75rem 0.75rem;
    }
    
    .product-modal-content h2 {
        font-size: 1.1rem;
        padding-right: 2rem;
        line-height: 1.2;
    }
    
    .product-modal-close {
        width: 32px;
        height: 32px;
        font-size: 1.5rem;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .modal-info-grid {
        padding: 0.5rem;
        gap: 0.4rem;
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    }
    
    .modal-info-item strong {
        font-size: 0.75rem;
    }
    
    .modal-info-item span {
        font-size: 0.95rem;
    }
    
    .modal-short-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .modal-rating {
        padding-bottom: 0.5rem;
        gap: 0.4rem;
    }
    
    .modal-rating .rating-stars {
        font-size: 1rem;
    }
    
    .modal-rating .rating-score {
        font-size: 0.9rem;
    }
    
    .modal-actions .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .modal-equipment-item {
        padding: 0.35rem;
        font-size: 0.85rem;
    }
    
    .modal-slider-prev,
    .modal-slider-next {
        padding: 6px 10px;
        font-size: 1.1rem;
    }
    
    .modal-slider-dots {
        bottom: 8px;
        gap: 5px;
    }
    
    .modal-slider-dot {
        width: 8px;
        height: 8px;
    }
}

/* Product List Widget */
.product-list-widget {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 1200px) {
    .product-list-widget {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.product-list-widget .product-widget-link {
    margin-bottom: 0;
}

.product-list-empty {
    padding: 3rem 2rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
    margin: 2rem 0;
}

.product-list-error {
    padding: 2rem;
    text-align: center;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    margin: 2rem 0;
}
