/**
 * Rozen.nl Productpagina v2.1 - Frontend Styles
 * Met checkbox toggle add-ons
 */

:root {
    --rozen-primary: #1a1a1a;
    --rozen-primary-dark: #000000;
    --rozen-primary-light: #f5f5f5;
    --rozen-accent: #8B0000;
    --rozen-accent-light: #a52a2a;
    --rozen-green: #2e7d32;
    --rozen-green-light: #e8f5e9;
    --rozen-text: #1a1a1a;
    --rozen-text-light: #666666;
    --rozen-border: #e0e0e0;
    --rozen-white: #ffffff;
    --rozen-bg: #fafafa;
    --rozen-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --rozen-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --rozen-radius: 8px;
    --rozen-radius-sm: 6px;
    --rozen-transition: all 0.25s ease;
}

.rozen-product-wrapper {
    background: var(--rozen-bg);
    padding: 20px 0 60px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.rozen-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.rozen-breadcrumb {
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--rozen-text-light);
}

.rozen-breadcrumb a {
    color: var(--rozen-accent);
    text-decoration: none;
}

.rozen-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* Left Column */
.rozen-product-left {
    position: sticky;
    top: 20px;
}

.rozen-main-image {
    background: var(--rozen-white);
    border-radius: var(--rozen-radius);
    overflow: hidden;
    box-shadow: var(--rozen-shadow);
    margin-bottom: 16px;
}

.rozen-main-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.rozen-thumbnails {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.rozen-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--rozen-radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--rozen-transition);
    background: var(--rozen-white);
    display: block;
}

.rozen-thumb:hover,
.rozen-thumb.active {
    border-color: var(--rozen-primary);
}

.rozen-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block;
}

.rozen-description {
    background: var(--rozen-white);
    border-radius: var(--rozen-radius);
    padding: 28px;
    box-shadow: var(--rozen-shadow);
}

.rozen-description h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
}

.rozen-description p {
    color: var(--rozen-text-light);
    line-height: 1.7;
    margin: 0 0 20px;
}

.rozen-usps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rozen-usps li {
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--rozen-border);
    color: var(--rozen-text);
}

.rozen-usps li:last-child {
    border-bottom: none;
}

.rozen-usps li::before {
    content: '✔';
    color: var(--rozen-green);
    margin-right: 10px;
    font-weight: bold;
}

/* Right Column */
.rozen-product-right {
    background: var(--rozen-white);
    border-radius: var(--rozen-radius);
    padding: 32px;
    box-shadow: var(--rozen-shadow);
}

.rozen-product-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.3;
    color: var(--rozen-text);
}

.rozen-short-description {
    font-size: 14px;
    color: var(--rozen-text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.rozen-short-description p {
    margin: 0 0 8px;
}

.rozen-short-description p:last-child {
    margin-bottom: 0;
}

.rozen-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--rozen-accent);
    margin-bottom: 24px;
}

.rozen-subtitle {
    color: var(--rozen-text-light);
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 16px;
    display: block;
}

/* Linked Products */
.rozen-linked-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
    margin-bottom: 28px;
}

.rozen-linked-product-card {
    background: var(--rozen-white);
    border: 2px solid var(--rozen-border);
    border-radius: var(--rozen-radius);
    padding: 10px;
    cursor: pointer;
    text-align: center;
    transition: var(--rozen-transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.rozen-linked-product-card:hover {
    border-color: var(--rozen-primary);
    box-shadow: var(--rozen-shadow-hover);
    transform: translateY(-2px);
}

.rozen-linked-product-card.selected {
    border-color: var(--rozen-primary);
    background: var(--rozen-primary-light);
}

.rozen-linked-product-card img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: top center !important;
    border-radius: var(--rozen-radius-sm);
    margin-bottom: 8px;
}

.rozen-linked-product-card .product-label {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 4px;
    color: var(--rozen-text);
}

.rozen-linked-product-card .product-price {
    color: var(--rozen-accent);
    font-weight: 700;
    font-size: 14px;
}

/* Custom Quantity */
.rozen-custom-quantity {
    background: var(--rozen-primary-light);
    border-radius: var(--rozen-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.rozen-custom-quantity label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}

.rozen-custom-quantity input {
    width: 100px;
    padding: 12px;
    font-size: 18px;
    text-align: center;
    border: 2px solid var(--rozen-border);
    border-radius: var(--rozen-radius-sm);
}

.rozen-custom-quantity input:focus {
    border-color: var(--rozen-primary);
    outline: none;
}

.rozen-per-stuk-price {
    margin-left: 15px;
    color: var(--rozen-text-light);
}

/* Add-on Toggle Sections */
.rozen-addon-toggle {
    background: var(--rozen-bg);
    border-radius: var(--rozen-radius);
    margin-bottom: 16px;
    overflow: hidden;
    transition: var(--rozen-transition);
}

.rozen-addon-toggle.active {
    background: var(--rozen-green-light);
}

.rozen-addon-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    cursor: pointer;
    transition: var(--rozen-transition);
}

.rozen-addon-header:hover {
    background: rgba(0,0,0,0.02);
}

.rozen-addon-checkbox {
    width: 26px;
    height: 26px;
    border: 2px solid var(--rozen-border);
    border-radius: 6px;
    background: var(--rozen-white);
    flex-shrink: 0;
    transition: var(--rozen-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 14px;
    font-weight: bold;
}

.rozen-addon-toggle.active .rozen-addon-checkbox {
    background: var(--rozen-green);
    border-color: var(--rozen-green);
    color: white;
}

.rozen-addon-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.rozen-addon-text {
    flex: 1;
}

.rozen-addon-text strong {
    display: block;
    font-size: 15px;
    color: var(--rozen-text);
}

.rozen-addon-text small {
    color: var(--rozen-text-light);
    font-size: 13px;
}

.rozen-addon-price {
    font-weight: 700;
    color: var(--rozen-green);
    font-size: 15px;
    flex-shrink: 0;
}

/* Add-on Content (hidden by default) */
.rozen-addon-content {
    display: none;
    padding: 0 20px 20px;
    border-top: 1px solid var(--rozen-border);
}

.rozen-addon-toggle.active .rozen-addon-content {
    display: block;
}

.rozen-addon-hint {
    font-size: 13px;
    color: var(--rozen-text-light);
    margin: 15px 0 12px;
    font-style: italic;
}

/* Add-on Options Grid (text blocks) */
.rozen-addon-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}

.rozen-addon-option {
    background: var(--rozen-white);
    border: 2px solid var(--rozen-border);
    border-radius: var(--rozen-radius-sm);
    padding: 12px 10px;
    cursor: pointer;
    text-align: center;
    transition: var(--rozen-transition);
    position: relative;
    font-size: 13px;
}

.rozen-addon-option:hover {
    border-color: var(--rozen-primary);
    background: var(--rozen-primary-light);
}

.rozen-addon-option.selected {
    border-color: var(--rozen-green);
    background: var(--rozen-green-light);
}

.rozen-addon-option input {
    display: none;
}

.rozen-addon-option .option-label {
    display: block;
    font-weight: 500;
    color: var(--rozen-text);
    line-height: 1.3;
}

.rozen-addon-option .option-price {
    display: block;
    font-size: 12px;
    color: var(--rozen-accent);
    margin-top: 4px;
    font-weight: 600;
}

.rozen-addon-option .option-price-small {
    display: block;
    font-size: 11px;
    color: var(--rozen-text-light);
    margin-top: 4px;
}

.rozen-addon-option .option-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 14px;
    background: #F5E3CF;
    color: #8B4513;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--rozen-transition);
    margin-top: 6px;
}

.rozen-addon-option .option-preview:hover {
    transform: scale(1.1);
    background: #E8D4BC;
}

/* Multi-select options (extras) */
.rozen-addon-options-multi .rozen-addon-option {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    padding: 10px 12px;
}

.rozen-addon-options-multi .option-label {
    flex: 1;
}

.rozen-addon-options-multi .option-price {
    margin-top: 0;
}

/* Kaartje Message */
.rozen-kaartje-message {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--rozen-border);
}

.rozen-kaartje-message label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.rozen-kaartje-message textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--rozen-border);
    border-radius: var(--rozen-radius-sm);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
}

.rozen-kaartje-message textarea:focus {
    outline: none;
    border-color: var(--rozen-primary);
}

.rozen-char-count {
    text-align: right;
    font-size: 12px;
    color: var(--rozen-text-light);
    margin-top: 4px;
}

.rozen-char-count.warning { color: #e67e22; }
.rozen-char-count.limit { color: #e74c3c; }

/* Preview Modal - 50% screen height */
.rozen-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rozen-preview-modal.active {
    display: flex;
}

.rozen-preview-content {
    background: var(--rozen-white);
    border-radius: var(--rozen-radius);
    padding: 16px;
    max-width: 400px;
    width: 100%;
    max-height: 50vh;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.25s ease;
    display: flex;
    flex-direction: column;
}

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

.rozen-preview-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: transparent;
    color: var(--rozen-text-light);
    border: none;
    border-radius: 4px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--rozen-transition);
    z-index: 1;
    line-height: 1;
}

.rozen-preview-close:hover {
    background: var(--rozen-bg);
    color: var(--rozen-text);
}

.rozen-preview-image {
    width: 100%;
    height: auto;
    max-height: calc(50vh - 120px);
    object-fit: contain;
    border-radius: var(--rozen-radius-sm);
    display: block;
}

.rozen-preview-name {
    text-align: center;
    font-weight: 600;
    margin: 12px 0 4px;
    font-size: 16px;
}

.rozen-preview-price {
    text-align: center;
    color: var(--rozen-accent);
    font-weight: 700;
    font-size: 18px;
}

/* Delivery Info */
.rozen-delivery-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--rozen-primary-light);
    border-radius: var(--rozen-radius);
    padding: 18px;
    margin: 24px 0;
    border-left: 4px solid var(--rozen-primary);
}

.rozen-delivery-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.rozen-delivery-text {
    font-size: 14px;
    color: var(--rozen-text);
    line-height: 1.5;
}

/* Total & Cart */
.rozen-add-section {
    border-top: 2px solid var(--rozen-border);
    padding-top: 24px;
    margin-top: 8px;
}

.rozen-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rozen-total-label {
    font-size: 16px;
    color: var(--rozen-text-light);
}

.rozen-total-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--rozen-accent);
}

.rozen-add-to-cart-btn {
    width: 100%;
    padding: 18px 32px;
    background: var(--rozen-accent);
    color: white;
    border: none;
    border-radius: var(--rozen-radius);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--rozen-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.rozen-add-to-cart-btn:hover {
    background: var(--rozen-accent-light);
    transform: translateY(-2px);
    box-shadow: var(--rozen-shadow-hover);
}

/* Responsive */
@media (max-width: 1024px) {
    .rozen-product-grid { gap: 32px; }
    .rozen-addon-options { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .rozen-product-grid { grid-template-columns: 1fr; gap: 24px; }
    .rozen-product-left { position: static; }
    .rozen-product-title { font-size: 22px; }
    .rozen-linked-products { grid-template-columns: repeat(3, 1fr); }
    .rozen-product-right { padding: 20px; }
    .rozen-preview-content { max-height: 60vh; }
    .rozen-addon-options { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .rozen-container { padding: 0 12px; }
    .rozen-linked-products { grid-template-columns: repeat(2, 1fr); }
    .rozen-addon-options { grid-template-columns: repeat(2, 1fr); }
    .rozen-total-price { font-size: 24px; }
    .rozen-addon-header { flex-wrap: wrap; }
    .rozen-addon-price { width: 100%; text-align: right; margin-top: 8px; }
}
