/* =============================================================================
   ECWID INTEGRATION - FRONTEND STYLES
   ============================================================================= */

/* Import SCSS gecompileerde bestanden */
@import 'variables.css';
@import 'product-page.css';

/* Basis styling voor Ecwid integratie */
.ecwid-products {
    margin: 2rem 0;
}

.ecwid-product {
    margin-bottom: 2rem;
    transition: transform 0.2s ease-in-out;
}

.ecwid-product:hover {
    transform: translateY(-2px);
}

.ecwid-product-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.ecwid-product-image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.ecwid-product:hover .ecwid-product-image img {
    transform: scale(1.05);
}

.ecwid-product-info {
    padding: 1rem 0;
}

.ecwid-product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ecwid-product-title a {
    color: #333;
    text-decoration: none;
}

.ecwid-product-title a:hover {
    color: #850000;
}

.ecwid-product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #850000;
    margin-bottom: 0.5rem;
}

.ecwid-product-sku {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.ecwid-product-brand {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.ecwid-product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.ecwid-product-actions {
    margin-top: 1rem;
}

.ecwid-view-product-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #850000;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: #850000 !important;
    --bs-btn-bg: #850000 !important;
}

.ecwid-view-product-btn:hover {
    background: #b30000;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.ecwid-disabled-badge {
    background: #ffc107;
    color: #333;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.ecwid-no-products,
.ecwid-error {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Responsive grid */
@media (max-width: 768px) {
    .ecwid-product {
        margin-bottom: 1.5rem;
    }
    
    .ecwid-product-title {
        font-size: 1.1rem;
    }
    
    .ecwid-view-product-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Loading states */
.ecwid-loading {
    text-align: center;
    padding: 2rem;
}

.ecwid-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #850000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* eCwid Frontend Product Styling */

.ecwid-products {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

/* Grid template */
.ecwid-template-grid.ecwid-columns-1 { grid-template-columns: 1fr; }
.ecwid-template-grid.ecwid-columns-2 { grid-template-columns: repeat(2, 1fr); }
.ecwid-template-grid.ecwid-columns-3 { grid-template-columns: repeat(3, 1fr); }
.ecwid-template-grid.ecwid-columns-4 { grid-template-columns: repeat(4, 1fr); }
.ecwid-template-grid.ecwid-columns-5 { grid-template-columns: repeat(5, 1fr); }
.ecwid-template-grid.ecwid-columns-6 { grid-template-columns: repeat(6, 1fr); }

/* List template */
.ecwid-template-list {
    grid-template-columns: 1fr;
}

.ecwid-template-list .ecwid-product {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ecwid-template-list .ecwid-product-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
}

.ecwid-template-list .ecwid-product-info {
    flex: 1;
}

/* Product styling */
.ecwid-product {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.ecwid-product:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.ecwid-product.disabled {
    opacity: 0.6;
    filter: grayscale(50%);
}

.ecwid-product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.ecwid-product:hover .ecwid-product-image img {
    transform: scale(1.05);
}

.ecwid-no-image {
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.ecwid-product-info {
    padding: 15px;
}

.ecwid-product-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.ecwid-disabled-badge {
    background: #dc3545;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: normal;
    margin-left: 8px;
}

.ecwid-product-sku {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.ecwid-product-description {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.ecwid-product-description p {
    margin: 0 0 8px 0;
}

.ecwid-product-description p:last-child {
    margin-bottom: 0;
}

.ecwid-product-price {
    font-size: 20px;
    font-weight: 700;
    color: #2c5aa0;
    margin: 12px 0 0 0;
}

.ecwid-product-brand {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #777;
    font-style: italic;
}

/* Product links */
.ecwid-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ecwid-product-title-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ecwid-product-title-link:hover {
    color: #850000;
    text-decoration: none;
}

.ecwid-product-actions {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.ecwid-view-product-btn {
    display: inline-block;
    background: #850000;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.ecwid-view-product-btn:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* Single Product Page Styling */
.ecwid-single-product {
    padding: 20px 0;
}

.ecwid-product-gallery .main-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ecwid-product-gallery .thumbnail-image {
    cursor: pointer;
    transition: opacity 0.3s ease;
    border-radius: 4px;
}

.ecwid-product-gallery .thumbnail-image:hover {
    opacity: 0.8;
}

.ecwid-product-details .ecwid-product-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.ecwid-product-price .h3 {
    font-weight: bold;
    color: #2c5aa0;
}

.ecwid-stock-status .badge {
    font-size: 0.9rem;
}

.ecwid-product-description .content {
    line-height: 1.6;
    color: #555;
}

.ecwid-product-attributes table {
    margin-bottom: 0;
}

.ecwid-product-actions .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

.ecwid-shipping-info {
    border-left: 4px solid #850000;
    background: #f8f9fa;
}

.ecwid-related-products {
    border-top: 1px solid #dee2e6;
    padding-top: 2rem;
    margin-top: 2rem;
}

.ecwid-related-products h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

/* Error en no-products styling */
.ecwid-error,
.ecwid-no-products {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin: 20px 0;
}

.ecwid-error {
    color: #dc3545;
    background: #f8d7da;
    border-color: #f5c6cb;
}

/* Responsive design */
@media (max-width: 768px) {
    .ecwid-template-grid.ecwid-columns-3,
    .ecwid-template-grid.ecwid-columns-4,
    .ecwid-template-grid.ecwid-columns-5,
    .ecwid-template-grid.ecwid-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ecwid-template-list .ecwid-product {
        flex-direction: column;
        text-align: center;
    }
    
    .ecwid-template-list .ecwid-product-image {
        width: 100%;
        height: 200px;
    }
    
    .ecwid-product-image {
        height: 180px;
    }
    
    .ecwid-product-title {
        font-size: 16px;
    }
    
    .ecwid-product-price {
        font-size: 18px;
    }
    
    .ecwid-single-product .ecwid-product-details .ecwid-product-title {
        font-size: 1.5rem;
    }
}

/* Ecwid Storefront Container */
.cart-page #ecwid-storefront-container {
    min-height: 600px;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
}

.cart-page #ecwid-storefront {
    width: 100%;
    min-height: 500px;
}

.cart-page #back-to-cart {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
}

.cart-page #back-to-cart:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    transform: translateY(-1px);
}

.cart-page #back-to-cart i {
    margin-right: 8px;
}

/* Ecwid storefront specifieke styling */
.cart-page .ecwid-storefront-wrapper {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* Ecwid page title verbergen */
.ec-page-title {
    display: none !important;
}

/* Mobile aanpassingen voor storefront */
@media (max-width: 768px) {
    .cart-page #ecwid-storefront-container {
        padding: 15px;
        margin: 0 -15px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .cart-page #back-to-cart {
        width: 100%;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .cart-page #ecwid-storefront {
        min-height: 400px;
    }
}

/* =============================================================================
   ECWID CART PAGE STYLES
   ============================================================================= */

/* Cart page styling */
.ecwid-cart-page {
    padding: 20px 0;
}
.ecwid-cart-page .btn-primary{
    color:#FFFFFF;
}

.ecwid-cart-page .cart-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}
html#ecwid_html body#ecwid_body .ec-minicart--m .ec-minicart__counter::after{
    background-color: #850000 !important;
}

.ecwid-cart-page .cart-item:last-child {
    border-bottom: none;
}

.ecwid-cart-page .cart-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.ecwid-cart-page .product-image-container {
    position: relative;
    min-height: 100px;
}

.ecwid-cart-page .product-image {
    display: block !important;
}

.ecwid-cart-page .product-placeholder {
    display: none !important;
}

.ecwid-cart-page .product-placeholder.show {
    display: flex !important;
}

.ecwid-cart-page .cart-item .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.ecwid-cart-page .quantity-input {
    max-width: 70px;
    text-align: center;
    border-left: none;
    border-right: none;
    padding: 0.375rem 0.25rem;
}

.ecwid-cart-page .quantity-input:focus {
    border-color: #850000;
    box-shadow: 0 0 0 0.2rem rgba(133, 0, 0, 0.25);
}

.ecwid-cart-page .input-group .btn {
    border-color: #ddd;
}

.ecwid-cart-page .input-group .btn:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.ecwid-cart-page .remove-item {
    font-size: 0.875rem;
    padding: 5px 10px;
}

.ecwid-cart-page .remove-item:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.ecwid-cart-page .cart-summary {
    position: sticky;
    top: 20px;
}

.ecwid-cart-page .cart-summary .card-body {
    padding: 25px;
}

.ecwid-cart-page .cart-summary .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
}

.ecwid-cart-page .cart-summary hr {
    margin: 20px 0;
    border-color: #eee;
}

.ecwid-cart-page .apply-discount .card-body {
    padding: 20px;
}

.ecwid-cart-page .apply-discount .input-group {
    margin-bottom: 15px;
}

.ecwid-cart-page .apply-discount .btn-apply-discount {
    white-space: nowrap;
    padding: 8px 16px;
}

.ecwid-cart-page #empty-cart {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ecwid-cart-page #empty-cart i {
    color: #6c757d;
    margin-bottom: 20px;
}

.ecwid-cart-page #empty-cart h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.ecwid-cart-page #empty-cart .text-muted {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.ecwid-cart-page #cart-loader {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ecwid-cart-page #cart-loader .spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 20px;
}

.ecwid-cart-page .btn-rounded {
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 500;
}

.ecwid-cart-page .btn-outline-primary {
    border-color: #850000;
    color: #850000;
}

.ecwid-cart-page .btn-outline-primary:hover {
    background-color: #850000;
    border-color: #850000;
    color: white;
}

.ecwid-cart-page .btn-primary {
    background-color: #850000;
    border-color: #850000;
}

.ecwid-cart-page .btn-primary:hover {
    background-color: #b30000;
    border-color: #b30000;
}

/* Cart responsive design */
@media (max-width: 768px) {
    .ecwid-cart-page .cart-item {
        padding: 15px 0;
    }
    
    .ecwid-cart-page .cart-item .col-md-3,
    .ecwid-cart-page .cart-item .col-md-5,
    .ecwid-cart-page .cart-item .col-md-2 {
        margin-bottom: 15px;
    }
    
    .ecwid-cart-page .cart-summary {
        position: static;
        margin-top: 30px;
    }
    
    .ecwid-cart-page .quantity-input {
        max-width: 60px;
    }
    
    .ecwid-cart-page .input-group .btn {
        padding: 5px 10px;
        font-size: 0.875rem;
    }
    
    .ecwid-cart-page .remove-item {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}

/* =============================================================================
   PRODUCT OPTIONS STYLING
   ============================================================================= */

/* Product options container */
.product-option {
    margin-bottom: 1.5rem;
}

.product-option .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    display: block;
}

.product-option .form-label .text-danger {
    color: #dc3545;
    font-weight: 700;
}

/* Select dropdowns */
.product-option .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.product-option .form-select:focus {
    border-color: #850000;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(133, 0, 0, 0.25);
}

.product-option .form-select:invalid {
    border-color: #dc3545;
}

/* Form controls (text inputs, textarea, etc.) */
.product-option .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.product-option .form-control:focus {
    border-color: #850000;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(133, 0, 0, 0.25);
}

.product-option .form-control:invalid {
    border-color: #dc3545;
}

/* Textarea specific styling */
.product-option textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Radio buttons and checkboxes */
.product-option .form-check {
    margin-bottom: 0.75rem;
    padding-left: 1.5em;
}

.product-option .form-check-input {
    width: 1.25em;
    height: 1.25em;
    margin-top: 0.125em;
    margin-left: -1.5em;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid #ddd;
    appearance: none;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.product-option .form-check-input[type="checkbox"] {
    border-radius: 0.25em;
}

.product-option .form-check-input[type="radio"] {
    border-radius: 50%;
}

.product-option .form-check-input:focus {
    border-color: #850000;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(133, 0, 0, 0.25);
}

.product-option .form-check-input:checked {
    background-color: #850000;
    border-color: #850000;
}

.product-option .form-check-input:checked[type="checkbox"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.product-option .form-check-input:checked[type="radio"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

.product-option .form-check-label {
    color: #333;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
}

.product-option .form-check-input:disabled ~ .form-check-label {
    color: #6c757d;
    cursor: not-allowed;
}

/* File input styling */
.product-option input[type="file"] {
    padding: 0.375rem 0.75rem;
}

/* Date input styling */
.product-option input[type="date"] {
    padding: 0.75rem 1rem;
}

/* Error styling */
.product-option .form-select.error,
.product-option .form-control.error,
.product-option .form-check-input.error {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

/* Error message styling */
#option-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

#option-error.show {
    display: block;
}

/* Price modifier styling in option text */
.product-option .form-check-label,
.product-option .form-select option {
    font-weight: 500;
}

.product-option .price-modifier {
    color: #850000;
    font-weight: 600;
}

/* Responsive styling for options */
@media (max-width: 768px) {
    .product-option {
        margin-bottom: 1.25rem;
    }
    
    .product-option .form-select,
    .product-option .form-control {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
    
    .product-option .form-check {
        margin-bottom: 0.6rem;
    }
    
    .product-option .form-check-label {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .product-option .form-select,
    .product-option .form-control {
        font-size: 0.85rem;
        padding: 0.5rem 0.7rem;
    }
    
    .product-option .form-check-input {
        width: 1.1em;
        height: 1.1em;
    }
    
    .product-option .form-check-label {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .ecwid-template-grid.ecwid-columns-2,
    .ecwid-template-grid.ecwid-columns-3,
    .ecwid-template-grid.ecwid-columns-4,
    .ecwid-template-grid.ecwid-columns-5,
    .ecwid-template-grid.ecwid-columns-6 {
        grid-template-columns: 1fr;
    }
    
    .ecwid-products {
        gap: 15px;
    }
    
    .ecwid-product-info {
        padding: 12px;
    }
    
    .ecwid-single-product .ecwid-product-details .ecwid-product-title {
        font-size: 1.25rem;
    }
} 