/**
 * Rozen Product Carousel - Frontend Styles
 * 
 * Elegante carousel styling consistent met Rozen.nl design
 */

/* Google Fonts (may already be loaded) */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Nunito:wght@400;500;600;700&display=swap');

/* ============================================
   CSS Variables (inherit from main plugin)
   ============================================ */
:root {
    --rozen-primary: #1a1a1a;
    --rozen-secondary: #4a4a4a;
    --rozen-accent: #8B0000;
    --rozen-accent-light: #a31515;
    --rozen-accent-soft: rgba(139, 0, 0, 0.08);
    --rozen-green: #2e7d32;
    --rozen-gold: #C4A35A;
    --rozen-cream: #FDF8F3;
    --rozen-blush: #F5E6E0;
    --rozen-bg: #FAF7F5;
    --rozen-white: #ffffff;
    --rozen-border: #e8e8e8;
    --rozen-border-light: #f0f0f0;
    --rozen-text-muted: #888888;
    --rozen-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --rozen-shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --rozen-shadow-lg: 0 12px 50px rgba(0, 0, 0, 0.12);
    --rozen-shadow-card: 0 4px 20px rgba(139, 0, 0, 0.06);
    --rozen-radius-sm: 8px;
    --rozen-radius-md: 12px;
    --rozen-radius-lg: 20px;
    --rozen-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --rozen-transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --rozen-font-main: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    --rozen-font-heading: 'Cormorant Garamond', Georgia, serif;
}

/* ============================================
   Carousel Section
   ============================================ */
.rozen-carousel-section {
    position: relative;
    overflow: hidden;
}

/* ============================================
   Carousel Header
   ============================================ */
.rozen-carousel-header {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 40px;
    padding: 0 4px;
}

.rozen-carousel-header--left {
    flex-direction: column;
    align-items: flex-start;
}

.rozen-carousel-header--center {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.rozen-carousel-header--between {
    justify-content: space-between;
    flex-wrap: wrap;
}

.rozen-carousel-header-content {
    flex: 1;
}

.rozen-carousel-title {
    font-family: var(--rozen-font-heading);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 500;
    font-style: italic;
    color: var(--rozen-primary);
    margin: 0 0 8px;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

/* Decorative element */
.rozen-carousel-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--rozen-accent), transparent);
    margin-top: 16px;
}

.rozen-carousel-header--center .rozen-carousel-title::after {
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(90deg, transparent, var(--rozen-accent), transparent);
}

.rozen-carousel-subtitle {
    font-family: var(--rozen-font-main);
    font-size: 15px;
    line-height: 1.6;
    color: var(--rozen-secondary);
    margin: 0;
    max-width: 500px;
}

.rozen-carousel-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* View All Link */
.rozen-view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--rozen-font-main);
    font-size: 14px;
    font-weight: 600;
    color: var(--rozen-accent);
    text-decoration: none;
    transition: var(--rozen-transition);
    padding: 10px 0;
}

.rozen-view-all-link:hover {
    color: var(--rozen-accent-light);
    gap: 12px;
}

.rozen-view-all-link svg {
    transition: transform 0.3s ease;
}

.rozen-view-all-link:hover svg {
    transform: translateX(4px);
}

/* ============================================
   Carousel Wrapper
   ============================================ */
.rozen-carousel-wrapper {
    position: relative;
    padding: 0 4px;
}

.rozen-carousel {
    overflow: visible;
}

.rozen-carousel .swiper-wrapper {
    align-items: stretch;
}

.rozen-carousel .swiper-slide {
    height: auto;
}

/* ============================================
   Navigation Arrows
   ============================================ */
.rozen-carousel-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--rozen-white);
    border: 1px solid var(--rozen-border);
    border-radius: 50%;
    color: var(--rozen-primary);
    cursor: pointer;
    transition: var(--rozen-transition);
    box-shadow: var(--rozen-shadow-sm);
    z-index: 10;
}

.rozen-carousel-arrow:hover {
    background: var(--rozen-accent);
    border-color: var(--rozen-accent);
    color: var(--rozen-white);
    transform: scale(1.05);
    box-shadow: var(--rozen-shadow-md);
}

.rozen-carousel-arrow:disabled,
.rozen-carousel-arrow.swiper-button-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Arrows in header */
.rozen-carousel-arrows--header {
    display: flex;
    gap: 8px;
}

.rozen-carousel-arrows--header .rozen-carousel-arrow {
    width: 44px;
    height: 44px;
}

/* Arrows on sides */
.rozen-carousel-arrow--sides {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.rozen-carousel-arrow--sides.rozen-carousel-prev {
    left: -24px;
}

.rozen-carousel-arrow--sides.rozen-carousel-next {
    right: -24px;
}

@media (max-width: 1440px) {
    .rozen-carousel-arrow--sides.rozen-carousel-prev {
        left: -16px;
    }
    
    .rozen-carousel-arrow--sides.rozen-carousel-next {
        right: -16px;
    }
}

@media (max-width: 1200px) {
    .rozen-carousel-arrow--sides {
        display: none;
    }
}

/* Arrows at bottom */
.rozen-carousel-arrows--bottom {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

/* ============================================
   Pagination Dots
   ============================================ */
.rozen-carousel-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.rozen-carousel-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--rozen-border);
    border-radius: 50%;
    opacity: 1;
    cursor: pointer;
    transition: var(--rozen-transition);
}

.rozen-carousel-pagination .swiper-pagination-bullet:hover {
    background: var(--rozen-text-muted);
}

.rozen-carousel-pagination .swiper-pagination-bullet-active {
    background: var(--rozen-accent);
    width: 28px;
    border-radius: 20px;
}

/* ============================================
   Product Card (Carousel Version)
   ============================================ */
.rozen-carousel-section .rozen-product-card {
    background: var(--rozen-white);
    border-radius: var(--rozen-radius-lg);
    overflow: hidden;
    transition: var(--rozen-transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Card Style: Elegant */
[data-style="elegant"] .rozen-product-card {
    box-shadow: var(--rozen-shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

[data-style="elegant"] .rozen-product-card:hover {
    box-shadow: var(--rozen-shadow-lg);
    transform: translateY(-6px);
}

/* Card Style: Minimal */
[data-style="minimal"] .rozen-product-card {
    background: transparent;
    border-radius: var(--rozen-radius-md);
}

[data-style="minimal"] .rozen-product-card:hover {
    background: var(--rozen-white);
    box-shadow: var(--rozen-shadow-md);
}

/* Card Style: Bordered */
[data-style="bordered"] .rozen-product-card {
    border: 1px solid var(--rozen-border);
}

[data-style="bordered"] .rozen-product-card:hover {
    border-color: var(--rozen-accent);
}

/* Product Link */
.rozen-carousel-section .rozen-product-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex-grow: 1;
}

/* Product Image */
.rozen-carousel-section .rozen-product-image {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--rozen-cream) 0%, var(--rozen-blush) 100%);
}

.rozen-carousel-section .rozen-product-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--rozen-transition-slow);
    aspect-ratio: 1/1;
    object-fit: cover;
}

/* Hover Effects */
[data-hover="zoom"] .rozen-product-card:hover .rozen-product-image img {
    transform: scale(1.08);
}

[data-hover="lift"] .rozen-product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--rozen-shadow-lg);
}

[data-hover="fade"] .rozen-product-card:hover .rozen-product-overlay {
    opacity: 1;
}

/* Product Overlay */
.rozen-carousel-section .rozen-product-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
    opacity: 0;
    transition: var(--rozen-transition);
}

.rozen-carousel-section .rozen-product-card:hover .rozen-product-overlay {
    opacity: 1;
}

.rozen-carousel-section .rozen-quick-view {
    padding: 10px 20px;
    background: var(--rozen-white);
    border-radius: 50px;
    font-family: var(--rozen-font-main);
    font-size: 12px;
    font-weight: 600;
    color: var(--rozen-primary);
    transform: translateY(10px);
    transition: var(--rozen-transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rozen-carousel-section .rozen-product-card:hover .rozen-quick-view {
    transform: translateY(0);
}

/* Product Badges */
.rozen-carousel-section .rozen-product-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.rozen-carousel-section .rozen-badge {
    display: inline-block;
    padding: 6px 14px;
    font-family: var(--rozen-font-main);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 50px;
}

.rozen-carousel-section .rozen-badge-sale {
    background: var(--rozen-accent);
    color: var(--rozen-white);
}

.rozen-carousel-section .rozen-badge-new {
    background: var(--rozen-green);
    color: var(--rozen-white);
}

/* Product Info */
.rozen-carousel-section .rozen-product-info {
    padding: 20px 20px 8px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.rozen-carousel-section .rozen-product-category {
    font-family: var(--rozen-font-main);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--rozen-accent);
    margin-bottom: 8px;
    font-weight: 600;
}

.rozen-carousel-section .rozen-product-title {
    font-family: var(--rozen-font-heading);
    font-size: 18px;
    font-weight: 500;
    color: var(--rozen-primary);
    margin: 0 0 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Product Rating */
.rozen-carousel-section .rozen-product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.rozen-carousel-section .rozen-stars {
    display: flex;
    gap: 2px;
    color: var(--rozen-gold);
}

.rozen-carousel-section .rozen-stars svg {
    width: 14px;
    height: 14px;
}

.rozen-carousel-section .rozen-review-count {
    font-family: var(--rozen-font-main);
    font-size: 12px;
    color: var(--rozen-text-muted);
}

/* Product Footer */
.rozen-carousel-section .rozen-product-footer-wrapper {
    padding: 0 20px 20px;
}

.rozen-carousel-section .rozen-product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--rozen-border-light);
}

.rozen-carousel-section .rozen-product-price {
    font-family: var(--rozen-font-main);
    font-size: 18px;
    font-weight: 700;
    color: var(--rozen-primary);
}

.rozen-carousel-section .rozen-product-price .rozen-price-prefix {
    font-size: 11px;
    font-weight: 500;
    color: var(--rozen-text-muted);
    display: block;
    margin-bottom: 2px;
}

.rozen-carousel-section .rozen-product-price del {
    color: var(--rozen-text-muted);
    font-weight: 400;
    font-size: 14px;
    margin-right: 8px;
}

.rozen-carousel-section .rozen-product-price ins {
    text-decoration: none;
    color: var(--rozen-accent);
}

/* Add to Cart Button */
.rozen-carousel-section .rozen-add-to-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #F5E3CF;
    border: none;
    border-radius: 50px;
    font-family: var(--rozen-font-main);
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    transition: var(--rozen-transition);
    white-space: nowrap;
    text-decoration: none;
}

.rozen-carousel-section .rozen-add-to-cart:hover {
    background: #000000;
    transform: scale(1.02);
    color: var(--rozen-white);
}

.rozen-carousel-section .rozen-add-to-cart svg {
    width: 16px;
    height: 16px;
}

/* Loading state */
.rozen-carousel-section .rozen-add-to-cart.loading {
    pointer-events: none;
    opacity: 0.7;
}

.rozen-carousel-section .rozen-add-to-cart.loading svg {
    animation: rozen-spin 1s linear infinite;
}

@keyframes rozen-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Added state */
.rozen-carousel-section .rozen-add-to-cart.added {
    background: var(--rozen-green);
    color: var(--rozen-white);
}

/* ============================================
   Notice for Elementor Editor
   ============================================ */
.rozen-carousel-notice {
    padding: 40px;
    text-align: center;
    background: var(--rozen-cream);
    border: 2px dashed var(--rozen-border);
    border-radius: var(--rozen-radius-lg);
}

.rozen-carousel-notice p {
    margin: 0;
    color: var(--rozen-secondary);
    font-family: var(--rozen-font-main);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 1024px) {
    .rozen-carousel-header {
        margin-bottom: 32px;
    }
    
    .rozen-carousel-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .rozen-carousel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .rozen-carousel-header--between .rozen-carousel-header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .rozen-carousel-title {
        font-size: 28px;
    }
    
    .rozen-carousel-subtitle {
        font-size: 14px;
    }
    
    .rozen-carousel-section .rozen-product-info {
        padding: 16px 16px 8px;
    }
    
    .rozen-carousel-section .rozen-product-footer-wrapper {
        padding: 0 16px 16px;
    }
    
    .rozen-carousel-section .rozen-product-title {
        font-size: 16px;
    }
    
    .rozen-carousel-section .rozen-product-price {
        font-size: 16px;
    }
    
    .rozen-carousel-section .rozen-product-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .rozen-carousel-section .rozen-add-to-cart {
        width: 100%;
        justify-content: center;
    }
    
    .rozen-carousel-pagination {
        margin-top: 24px;
    }
}

@media (max-width: 480px) {
    .rozen-carousel-arrow {
        width: 40px;
        height: 40px;
    }
    
    .rozen-carousel-arrows--header .rozen-carousel-arrow {
        width: 36px;
        height: 36px;
    }
}

/* ============================================
   Animations
   ============================================ */
.rozen-carousel-section .rozen-product-card {
    animation: rozenFadeInUp 0.6s ease forwards;
}

@keyframes rozenFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for visible slides */
.swiper-slide-visible:nth-child(1) .rozen-product-card { animation-delay: 0.05s; }
.swiper-slide-visible:nth-child(2) .rozen-product-card { animation-delay: 0.1s; }
.swiper-slide-visible:nth-child(3) .rozen-product-card { animation-delay: 0.15s; }
.swiper-slide-visible:nth-child(4) .rozen-product-card { animation-delay: 0.2s; }
.swiper-slide-visible:nth-child(5) .rozen-product-card { animation-delay: 0.25s; }
.swiper-slide-visible:nth-child(6) .rozen-product-card { animation-delay: 0.3s; }

/* ========================================
   Cart Popup Styles
   ======================================== */

.rozen-archive-cart-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.rozen-archive-cart-popup.show {
    display: block;
}

.rozen-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.rozen-popup-content {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px 32px;
    max-width: 420px;
    width: 90%;
    margin: 80px auto 0;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.rozen-popup-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.rozen-popup-close:hover {
    color: #333;
}

.rozen-popup-icon {
    width: 64px;
    height: 64px;
    background: #4caf50;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.rozen-popup-content h3 {
    margin: 0 0 24px;
    font-size: 22px;
    color: #222;
    font-weight: 600;
}

.rozen-popup-product {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.rozen-popup-image {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    background: #eee;
}

.rozen-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rozen-popup-details {
    flex: 1;
}

.rozen-popup-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.rozen-popup-qty {
    font-size: 13px;
    color: #888;
}

.rozen-popup-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid #eee;
    margin-bottom: 24px;
}

.rozen-popup-total span:first-child {
    font-size: 15px;
    color: #555;
}

.rozen-popup-total-price {
    font-size: 18px;
    font-weight: 700;
    color: #c0392b;
}

.rozen-popup-buttons {
    display: flex;
    gap: 12px;
}

.rozen-popup-buttons button,
.rozen-popup-buttons a {
    flex: 1;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rozen-popup-continue {
    background: #fff;
    color: #333;
    border: 2px solid #ddd;
}

.rozen-popup-continue:hover {
    border-color: #999;
    background: #f5f5f5;
}

.rozen-popup-checkout {
    background: #c9a96e;
    color: #fff;
    border: 2px solid #c9a96e;
}

.rozen-popup-checkout:hover {
    background: #b8955a;
    border-color: #b8955a;
    color: #fff;
}
