/**
 * Enhanced Plant Shop Styling
 * Beautiful, modern design for Plantscount webshop
 * Version: 2.0 - Incremental improvements
 */

/* ===================================
   Shop Header - Modern Category Bar
   =================================== */
.shop-header {
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, #FDFAF5 0%, #ffffff 100%);
    border: 1px solid #E8EDE5;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(45, 90, 61, 0.05);
    overflow: hidden;
    min-height: 100px;
}

/* Header image - left side compact */
.shop-header__image {
    width: 140px;
    flex-shrink: 0;
    margin: 0;
    overflow: hidden;
    position: relative;
    background: #E8EDE5;
}

.shop-header__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.shop-header:hover .shop-header__image img {
    transform: scale(1.05);
}

/* Content - right side */
.shop-header__content {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.shop-header__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #3D3229;
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.shop-header__description {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #5C5347;
    max-width: 700px;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .shop-header {
        flex-direction: column;
        min-height: auto;
    }

    .shop-header__image {
        width: 100%;
        height: 120px;
    }

    .shop-header__content {
        padding: 20px;
    }

    .shop-header__title {
        font-size: 1.4rem;
    }
}

/* ===================================
   Shop Discount Banner - Stapelkorting (Compact)
   =================================== */
.shop-discount-banner {
    background: linear-gradient(135deg, #E8F5E9 0%, #F1F8E9 50%, #E8F5E9 100%);
    border: 1px solid #C8E6C9;
    border-radius: 8px;
    padding: 10px 20px;
    margin: 0 0 20px;
    max-width: 1400px;
}

.shop-discount-banner__content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.shop-discount-banner__icon {
    color: #2D5A3D;
    flex-shrink: 0;
}

.shop-discount-banner__text {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    color: #3D3229;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.shop-discount-banner__text strong {
    color: #2D5A3D;
    font-weight: 600;
}

.shop-discount-banner__items {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.shop-discount-banner__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2D5A3D;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    min-width: 32px;
}

.shop-discount-banner__badge--highlight {
    background: linear-gradient(135deg, #C9A227 0%, #D4AF37 100%);
    color: #3D3229;
    padding: 4px 12px;
    font-size: 0.85rem;
}

.shop-discount-banner__sep {
    color: #9E9E9E;
    font-weight: 300;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .shop-discount-banner {
        padding: 12px 16px;
        margin: 0 16px 20px;
        border-radius: 10px;
    }

    .shop-discount-banner__content {
        flex-direction: column;
        gap: 8px;
    }

    .shop-discount-banner__icon {
        display: none;
    }

    .shop-discount-banner__text {
        flex-direction: column;
        gap: 6px;
        font-size: 0.9rem;
    }

    .shop-discount-banner__items {
        gap: 6px;
    }

    .shop-discount-banner__badge {
        font-size: 0.75rem;
        padding: 2px 8px;
    }

    .shop-discount-banner__badge--highlight {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
}

/* ===================================
   Shop Layout
   =================================== */
.shop-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* Ensure Single Product Page is FULL WIDTH */
.single-product .shop-layout {
    display: flex;
    flex-direction: column;
}

.single-product .shop-products {
    width: 100%;
}

.single-product .shop-sidebar {
    display: none;
    /* Hide sidebar on single product pages if present */
}

@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        order: 2;
    }

    .shop-products {
        order: 1;
    }
}

/* ===================================
   Sidebar Styling
   =================================== */
.shop-sidebar {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    height: fit-content;
    position: sticky;
    top: 100px;
}

@media (max-width: 1024px) {
    .shop-sidebar {
        position: static;
    }
}

/* ===================================
   Product Grid Enhancement
   =================================== */
.shop-products .products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 768px) {
    .shop-products .products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
}

@media (max-width: 480px) {
    .shop-products .products {
        grid-template-columns: 1fr !important;
    }
}

/* ===================================
   Product Card Enhancement
   =================================== */
.shop-products .product {
    background: white;
    border: 1px solid #e8ebe8;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.shop-products .product:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: #89A550;
}

/* Product Image */
.shop-products .product .woocommerce-loop-product__link {
    position: relative;
    overflow: hidden;
    background: #fafafa;
    display: block;
}

.shop-products .product img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    object-position: center bottom;
    background: #fafafa;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.shop-products .product:hover img {
    transform: scale(1.1);
}

/* Product Info */
.shop-products .product .woocommerce-loop-product__title {
    padding: 16px 16px 0 16px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #2c2c2c;
    min-height: 44px;
    margin: 0;
}

.shop-products .product .price {
    padding: 0 16px;
    font-size: 20px;
    font-weight: 700;
    color: #1a3a1a;
    margin: 12px 0;
}

.shop-products .product .price del {
    color: #999;
    font-size: 16px;
    font-weight: 400;
}

.shop-products .product .price ins {
    text-decoration: none;
    color: #89A550;
}

/* Add to Cart Button */
/* Note: Most !important remain due to WooCommerce inline styles */
.shop-products .product .button,
.shop-products .product .add_to_cart_button {
    margin: 0 16px 16px 16px;
    padding: 12px 20px;
    background: #89A550 !important; /* Needed for inline styles */
    color: #ffffff !important; /* Needed for inline styles */
    border: none !important; /* Needed for inline styles */
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    line-height: 1.2;
}

/* Force white text on ALL add to cart buttons everywhere */
.shop-products .product .button,
.shop-products .product .add_to_cart_button,
.single_add_to_cart_button,
button.single_add_to_cart_button,
a.button.add_to_cart_button {
    color: #ffffff !important; /* Needed for inline styles */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    -webkit-text-fill-color: #ffffff !important; /* Webkit quirk */
}

.shop-products .product .button:hover,
.shop-products .product .add_to_cart_button:hover {
    background: #6b8540 !important; /* Needed for inline styles */
    color: #ffffff !important; /* Needed for inline styles */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 133, 64, 0.3);
}

/* Sale Badge */
.shop-products .product .onsale {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    background: #e74c3c !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    z-index: 10 !important;
    margin: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    line-height: 1 !important;
}

/* NIEUW Badge (zoals in screenshots) */
.shop-products .product .badge-new,
.shop-products .product .pc-badge--new {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    background: #3498db !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    z-index: 10 !important;
    margin: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    line-height: 1 !important;
}

/* Als beide badges er zijn, positioneer NIEUW rechts */
.shop-products .product .onsale+.badge-new,
.shop-products .product .onsale+.pc-badge--new {
    left: auto !important;
    right: 12px !important;
}

/* ===================================
   Quick View on Hover
   =================================== */
.shop-products .product::after {
    content: '👁 Snel bekijken';
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(26, 58, 26, 0.95);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 5;
}

.shop-products .product:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===================================
   Loading States
   =================================== */
.shop-products.loading {
    opacity: 0.6;
    pointer-events: none;
}

.shop-products.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 4px solid #e8ebe8;
    border-top-color: #89A550;
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

/* ===================================
   Pagination Enhancement
   =================================== */
.woocommerce-pagination {
    margin-top: 60px !important;
    padding-top: 40px !important;
    border-top: 1px solid #e8ebe8 !important;
}

.woocommerce-pagination ul {
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    border: none !important;
}

.woocommerce-pagination ul li {
    border: none !important;
    margin: 0 !important;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    min-width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #e8ebe8 !important;
    border-radius: 8px !important;
    background: white !important;
    color: #2c2c2c !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.woocommerce-pagination ul li a:hover {
    background: #f1f8f4 !important;
    border-color: #89A550 !important;
    color: #89A550 !important;
}

.woocommerce-pagination ul li span.current {
    background: #89A550 !important;
    border-color: #89A550 !important;
    color: white !important;
}

/* ===================================
   Mobile Optimizations
   =================================== */
@media (max-width: 768px) {
    .shop-header {
        padding: 40px 16px;
    }

    .shop-header__title {
        font-size: 32px;
    }

    .shop-header__description {
        font-size: 16px;
    }

    .shop-layout {
        gap: 24px;
    }

    .shop-sidebar {
        padding: 16px;
    }
}

/* ===================================
   Smooth Scroll Behavior
   =================================== */
html {
    scroll-behavior: smooth;
}

/* ===================================
   Focus States for Accessibility
   =================================== */
.shop-products .product:focus-within {
    outline: 3px solid #89A550;
    outline-offset: 2px;
}

.shop-products .product .button:focus {
    outline: 3px solid #89A550;
    outline-offset: 2px;
}

/* ===================================
   Mobile Filter Toolbar
   =================================== */
.shop-mobile-toolbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #e8ebe8;
}

@media (max-width: 1024px) {
    .shop-mobile-toolbar {
        display: flex;
    }
}

.shop-mobile-filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e8ebe8;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #3D3229;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-mobile-filter-btn:hover {
    border-color: #89A550;
    background: #f9fdf6;
}

.shop-mobile-filter-btn svg {
    color: #2D5A3D;
}

.shop-mobile-sort {
    flex: 1;
    max-width: 200px;
}

.shop-mobile-sort-select {
    width: 100%;
    padding: 10px 32px 10px 12px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233D3229' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid #e8ebe8;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #3D3229;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.shop-mobile-sort-select:hover,
.shop-mobile-sort-select:focus {
    border-color: #89A550;
    outline: none;
}

/* ===================================
   Desktop Sort Dropdown
   =================================== */
.shop-desktop-sort {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 20px;
}

@media (max-width: 1024px) {
    .shop-desktop-sort {
        display: none;
    }
}

.shop-desktop-sort__label {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #5C5347;
}

.shop-desktop-sort-select {
    padding: 8px 36px 8px 14px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233D3229' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid #e8ebe8;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #3D3229;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 180px;
    transition: all 0.2s ease;
}

.shop-desktop-sort-select:hover,
.shop-desktop-sort-select:focus {
    border-color: #89A550;
    outline: none;
}