/**
 * Winterhalter Webshop Frontend CSS
 * VaatwasBaas.nl
 */

:root {
    --whw-primary: #7B52A0;
    --whw-primary-dark: #5B3E7D;
    --whw-accent: #E86F2C;
    --whw-accent-light: #F5923D;
    --whw-text: #2D3748;
    --whw-text-light: #718096;
    --whw-bg: #F7FAFC;
    --whw-white: #FFFFFF;
    --whw-border: #E2E8F0;
    --whw-success: #48BB78;
    --whw-error: #F56565;
    --whw-radius: 12px;
    --whw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --whw-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ============================================
   SHOP LAYOUT
   ============================================ */

.whw-shop {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.whw-shop-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--whw-border);
}

.whw-shop-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--whw-primary-dark);
    margin: 0;
}

.whw-shop-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.whw-search-input,
.whw-category-filter {
    padding: 0.75rem 1rem;
    border: 2px solid var(--whw-border);
    border-radius: var(--whw-radius);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 200px;
}

.whw-search-input:focus,
.whw-category-filter:focus {
    outline: none;
    border-color: var(--whw-primary);
    box-shadow: 0 0 0 3px rgba(123, 82, 160, 0.15);
}

/* ============================================
   PRODUCT GRID
   ============================================ */

.whw-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.whw-product-card {
    background: var(--whw-white);
    border-radius: var(--whw-radius);
    overflow: hidden;
    box-shadow: var(--whw-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.whw-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--whw-shadow-lg);
}

.whw-product-image {
    aspect-ratio: 4/3;
    background: var(--whw-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.whw-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.whw-no-image {
    color: var(--whw-text-light);
    font-size: 0.875rem;
}

.whw-product-info {
    padding: 1.25rem;
}

.whw-product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--whw-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.whw-product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--whw-text);
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.whw-product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--whw-primary-dark);
    margin-bottom: 1rem;
}

.whw-old-price {
    text-decoration: line-through;
    color: var(--whw-text-light);
    font-size: 1rem;
    font-weight: 400;
    margin-right: 0.5rem;
}

.whw-sale-price {
    color: var(--whw-accent);
}

.whw-add-to-cart {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--whw-primary);
    color: var(--whw-white);
    border: none;
    border-radius: calc(var(--whw-radius) - 4px);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.whw-add-to-cart:hover {
    background: var(--whw-primary-dark);
}

.whw-add-to-cart:active {
    transform: scale(0.98);
}

.whw-add-to-cart:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.whw-add-to-cart.whw-added {
    background: var(--whw-success);
}

/* ============================================
   WINKELWAGEN ICOON
   ============================================ */

.whw-cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--whw-primary);
    color: var(--whw-white);
    border-radius: var(--whw-radius);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.whw-cart-icon:hover {
    background: var(--whw-primary-dark);
    color: var(--whw-white);
}

.whw-cart-count {
    background: var(--whw-accent);
    color: var(--whw-white);
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -5px;
}

/* ============================================
   WINKELWAGEN PAGINA
   ============================================ */

.whw-cart-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.whw-cart-items {
    margin-bottom: 2rem;
}

.whw-cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: var(--whw-white);
    border-radius: var(--whw-radius);
    margin-bottom: 1rem;
    box-shadow: var(--whw-shadow);
}

.whw-cart-item-image {
    width: 100px;
    height: 80px;
    background: var(--whw-bg);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whw-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.whw-cart-item-info h4 {
    margin: 0 0 0.25rem;
    font-weight: 600;
    color: var(--whw-text);
}

.whw-cart-item-price {
    color: var(--whw-text-light);
    font-size: 0.9rem;
    margin: 0;
}

.whw-cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.whw-qty-minus,
.whw-qty-plus {
    width: 32px;
    height: 32px;
    border: 2px solid var(--whw-border);
    background: var(--whw-white);
    border-radius: 6px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.whw-qty-minus:hover,
.whw-qty-plus:hover {
    border-color: var(--whw-primary);
    background: var(--whw-bg);
}

.whw-qty-input {
    width: 60px;
    text-align: center;
    border: 2px solid var(--whw-border);
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 1rem;
}

.whw-cart-item-total {
    font-weight: 700;
    color: var(--whw-primary-dark);
    font-size: 1.1rem;
    min-width: 100px;
    text-align: right;
}

.whw-cart-item-remove {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--whw-bg);
    color: var(--whw-text-light);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.whw-cart-item-remove:hover {
    background: var(--whw-error);
    color: var(--whw-white);
}

.whw-empty-cart {
    text-align: center;
    padding: 3rem;
    color: var(--whw-text-light);
    font-size: 1.1rem;
}

/* Totalen */
.whw-cart-totals {
    background: var(--whw-white);
    border-radius: var(--whw-radius);
    padding: 1.5rem;
    box-shadow: var(--whw-shadow);
}

.whw-cart-totals-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--whw-border);
}

.whw-cart-totals-row:last-child {
    border-bottom: none;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--whw-primary-dark);
    padding-top: 1rem;
}

.whw-checkout-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-top: 1.5rem;
    background: var(--whw-accent);
    color: var(--whw-white);
    border: none;
    border-radius: var(--whw-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}

.whw-checkout-btn:hover {
    background: var(--whw-accent-light);
    color: var(--whw-white);
}

/* ============================================
   CHECKOUT PAGINA
   ============================================ */

.whw-checkout-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.whw-checkout-form {
    background: var(--whw-white);
    border-radius: var(--whw-radius);
    padding: 2rem;
    box-shadow: var(--whw-shadow);
}

.whw-form-section {
    margin-bottom: 2rem;
}

.whw-form-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--whw-primary-dark);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--whw-border);
}

.whw-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.whw-form-group {
    display: flex;
    flex-direction: column;
}

.whw-form-group label {
    font-weight: 500;
    color: var(--whw-text);
    margin-bottom: 0.5rem;
}

.whw-form-group input,
.whw-form-group textarea,
.whw-form-group select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--whw-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.whw-form-group input:focus,
.whw-form-group textarea:focus,
.whw-form-group select:focus {
    outline: none;
    border-color: var(--whw-primary);
    box-shadow: 0 0 0 3px rgba(123, 82, 160, 0.15);
}

.whw-form-group .required {
    color: var(--whw-error);
}

/* ============================================
   NOTIFICATIES
   ============================================ */

.whw-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--whw-radius);
    color: var(--whw-white);
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: var(--whw-shadow-lg);
}

.whw-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.whw-notification-success {
    background: var(--whw-success);
}

.whw-notification-error {
    background: var(--whw-error);
}

.whw-notification-info {
    background: var(--whw-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .whw-shop-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .whw-shop-filters {
        flex-direction: column;
    }
    
    .whw-search-input,
    .whw-category-filter {
        min-width: 100%;
    }
    
    .whw-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .whw-cart-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }
    
    .whw-cart-item-quantity,
    .whw-cart-item-total,
    .whw-cart-item-remove {
        grid-column: 2;
    }
}
