/**
 * Rozen Cart Icon Styles
 * Shopping bag icon + slide-out winkelwagen panel
 */

/* ============================================
   CSS Variables (matcht megamenu palette)
   ============================================ */
.rozen-cart-icon-wrap,
.rozen-cart-panel {
    --rci-primary: #1a1a1a;
    --rci-accent: #8B0000;
    --rci-gold: #c9a96e;
    --rci-gold-hover: #b8955a;
    --rci-cream: #F5E3CF;
    --rci-bg: #ffffff;
    --rci-border: #e8e8e8;
    --rci-text: #1a1a1a;
    --rci-text-light: #888888;
    --rci-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    --rci-radius: 12px;
    --rci-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --rci-font: 'Nunito', sans-serif;
}

/* ============================================
   Cart Icon Button
   ============================================ */
.rozen-cart-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.rozen-cart-icon-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--rci-primary);
    transition: var(--rci-transition);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rozen-cart-icon-btn:hover {
    color: var(--rci-gold);
    background: rgba(201, 169, 110, 0.08);
}

.rozen-cart-icon-svg {
    display: block;
}

/* Counter badge */
.rozen-cart-icon-count {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    background: var(--rci-gold);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--rci-font);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* ============================================
   Slide-out Panel
   ============================================ */
.rozen-cart-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100%;
    z-index: 99999;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--rci-font);
}

.rozen-cart-panel.open {
    right: 0;
}

/* Overlay achtergrond */
.rozen-cart-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: var(--rci-transition);
    z-index: -1;
}

.rozen-cart-panel.open .rozen-cart-panel-overlay {
    opacity: 1;
    visibility: visible;
}

/* Panel inhoud container */
.rozen-cart-panel-content {
    position: relative;
    z-index: 1;
    background: var(--rci-bg);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--rci-shadow);
}

/* ============================================
   Panel Header
   ============================================ */
.rozen-cart-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--rci-border);
    flex-shrink: 0;
}

.rozen-cart-panel-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--rci-text);
    font-family: var(--rci-font);
}

.rozen-cart-panel-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--rci-text-light);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--rci-transition);
    line-height: 1;
}

.rozen-cart-panel-close:hover {
    background: #f5f5f5;
    color: var(--rci-text);
}

/* ============================================
   Panel Body — scrollbaar
   ============================================ */
.rozen-cart-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

/* Lege staat */
.rozen-cart-panel-empty {
    text-align: center;
    padding: 60px 20px 40px;
    color: var(--rci-text-light);
}

.rozen-cart-panel-empty svg {
    opacity: 0.3;
    margin-bottom: 20px;
}

.rozen-cart-panel-empty p {
    font-size: 16px;
    margin: 0 0 24px;
    color: var(--rci-text-light);
}

/* ============================================
   Cart Items
   ============================================ */
.rozen-cart-panel-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rozen-cart-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rci-border);
    position: relative;
}

.rozen-cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Product afbeelding */
.rozen-cart-item-image {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid var(--rci-border);
}

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

/* Item details */
.rozen-cart-item-details {
    flex: 1;
    min-width: 0;
}

.rozen-cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--rci-text);
    margin-bottom: 4px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rozen-cart-item-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.rozen-cart-item-name a:hover {
    color: var(--rci-gold);
}

.rozen-cart-item-qty {
    font-size: 13px;
    color: var(--rci-text-light);
    margin-bottom: 6px;
}

.rozen-cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--rci-accent);
}

/* Verwijder knop — rond met kruisje */
.rozen-cart-item-remove {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rci-text-light);
    transition: var(--rci-transition);
    font-size: 16px;
    line-height: 1;
}

.rozen-cart-item-remove:hover {
    background: #ffe0e0;
    color: #c0392b;
}

/* ============================================
   Panel Footer
   ============================================ */
.rozen-cart-panel-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--rci-border);
    padding: 20px 28px 28px;
    background: var(--rci-bg);
}

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

.rozen-cart-panel-subtotal span:first-child {
    font-size: 15px;
    color: var(--rci-text-light);
    font-weight: 500;
}

.rozen-cart-subtotal-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--rci-text) !important;
}

/* Buttons */
.rozen-cart-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--rci-font);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--rci-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
}

.rozen-cart-btn-primary {
    background: var(--rci-gold);
    color: #fff;
    border-color: var(--rci-gold);
    margin-bottom: 10px;
}

.rozen-cart-btn-primary:hover {
    background: var(--rci-gold-hover);
    border-color: var(--rci-gold-hover);
    color: #fff;
}

.rozen-cart-btn-outline {
    background: transparent;
    color: var(--rci-text);
    border-color: var(--rci-border);
}

.rozen-cart-btn-outline:hover {
    border-color: var(--rci-text-light);
    color: var(--rci-text);
}

/* ============================================
   Body scroll lock
   ============================================ */
body.rozen-cart-panel-open {
    overflow: hidden;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    .rozen-cart-panel {
        width: 100%;
        right: -100%;
    }
}
