/* =====================================================================
   MarvikShop 5.0 — Product Info Styles
   =====================================================================
   File    : components/com_oscommerce/assets/css/product_info.css
   Purpose : Product detail page, LEGO red/yellow theme, dark mode ready
   Author  : Team MarvikShop
   License : GNU GPL v2
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. DESIGN TOKENS
   --------------------------------------------------------------------- */
.ms5-product {
    --ms5-red:        #d40000;
    --ms5-red-dark:   #a80000;
    --ms5-red-hover:  #b30000;
    --ms5-yellow:     #ffd400;
    --ms5-sand:       #f6e5d3;
    --ms5-bg:         #ffffff;
    --ms5-bg-alt:     #fafbfc;
    --ms5-border:     #e2e8f0;
    --ms5-text:       #1e293b;
    --ms5-text-muted: #64748b;
    --ms5-radius:     8px;
    --ms5-shadow:     0 1px 3px rgba(0, 0, 0, 0.06);

    box-sizing: border-box;
    font-family: Verdana, Arial, sans-serif;
    font-size: 13px;
    color: var(--ms5-text);
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 24px;
    background: var(--ms5-sand);
    border-radius: 5px;
    box-shadow: 5px 5px 5px 0px #2a2a2a;
}
.ms5-product *,
.ms5-product *::before,
.ms5-product *::after {
    box-sizing: border-box;
}

[data-bs-theme="dark"] .ms5-product {
    --ms5-bg:         #1e293b;
    --ms5-bg-alt:     #0f172a;
    --ms5-border:     #334155;
    --ms5-text:       #e2e8f0;
    --ms5-text-muted: #94a3b8;
    --ms5-sand:       #0f172a;
    box-shadow: 5px 5px 5px 0px #000;
}

/* ---------------------------------------------------------------------
   2. HEADER
   --------------------------------------------------------------------- */
.ms5-product__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #913a3a;
}

.ms5-product__header-main {
    flex: 1 1 300px;
    min-width: 0;
}

.ms5-product__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--ms5-text);
    margin: 8px 0 0;
    line-height: 1.3;
}

.ms5-product__header-price {
    flex-shrink: 0;
}

.ms5-product__price {
    font-family: 'Courier New', monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--ms5-red);
    white-space: nowrap;
}

/* ---------------------------------------------------------------------
   3. BREADCRUMB
   --------------------------------------------------------------------- */
.ms5-breadcrumb {
    font-size: 12px;
    color: var(--ms5-text-muted);
    line-height: 1.5;
}
.ms5-breadcrumb a {
    color: var(--ms5-red);
    text-decoration: none;
    font-weight: 600;
}
.ms5-breadcrumb a:hover {
    color: var(--ms5-red-dark);
    text-decoration: underline;
}
.ms5-breadcrumb span {
    color: var(--ms5-text-muted);
}
.ms5-breadcrumb__sep {
    margin: 0 6px;
    color: #cbd5e1;
}

/* ---------------------------------------------------------------------
   4. MAIN GRID
   --------------------------------------------------------------------- */
.ms5-product__grid {
    display: grid;
    grid-template-columns: minmax(240px, 380px) 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.ms5-product__media {
    background: var(--ms5-bg);
    border: 1px solid var(--ms5-border);
    border-radius: var(--ms5-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    max-height: 360px;
    overflow: hidden;
}

.ms5-product__image {
    max-width: 100%;
    max-height: 320px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.ms5-product__info {
    min-width: 0;
}

/* ---------------------------------------------------------------------
   5. SECTIONS
   --------------------------------------------------------------------- */
.ms5-product__section {
    margin-bottom: 20px;
}

.ms5-product__section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ms5-text);
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #913a3a;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ms5-product__description {
    font-size: 13px;
    line-height: 1.7;
    color: var(--ms5-text);
}

.ms5-product__attachments {
    margin: 16px 0;
    padding: 12px 16px;
    background: var(--ms5-bg);
    border: 1px solid var(--ms5-border);
    border-radius: var(--ms5-radius);
}

/* ---------------------------------------------------------------------
   6. SPECS TABLE
   --------------------------------------------------------------------- */
.ms5-specs {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--ms5-bg);
    border: 1px solid var(--ms5-border);
    border-radius: var(--ms5-radius);
    overflow: hidden;
}

.ms5-specs th,
.ms5-specs td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--ms5-border);
    vertical-align: top;
}

.ms5-specs tr:last-child th,
.ms5-specs tr:last-child td {
    border-bottom: none;
}

.ms5-specs th {
    width: 40%;
    font-weight: 700;
    color: var(--ms5-text-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.3px;
    background: var(--ms5-bg-alt);
}

.ms5-specs td {
    color: var(--ms5-text);
}

.ms5-specs a {
    color: var(--ms5-red);
    text-decoration: none;
    font-weight: 600;
}
.ms5-specs a:hover {
    color: var(--ms5-red-dark);
    text-decoration: underline;
}

/* ---------------------------------------------------------------------
   7. BUY SECTION
   --------------------------------------------------------------------- */
.ms5-product__buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px;
    background: var(--ms5-bg);
    border: 1px solid var(--ms5-border);
    border-radius: var(--ms5-radius);
    margin-bottom: 16px;
}

.ms5-stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ms5-text);
    flex-shrink: 0;
}

.ms5-stock__dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ms5-stock__dot--green  { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15); }
.ms5-stock__dot--yellow { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15); }
.ms5-stock__dot--red    { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); }

.ms5-buy-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-left: auto;
}

.ms5-buy-actions .ms5-buy-btn {
    min-width: 180px;
}

.ms5-product__points,
.ms5-product__wishlist {
    margin-top: 12px;
    font-size: 13px;
    color: var(--ms5-text-muted);
}

/* ---------------------------------------------------------------------
   8. BUY FORM (in winkelwagen)
   --------------------------------------------------------------------- */
.ms5-buy-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.ms5-buy-form__option {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ms5-buy-form__option label {
    font-size: 11px;
    font-weight: 700;
    color: var(--ms5-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ms5-buy-form__option select,
.ms5-buy-form__option input[type="text"] {
    padding: 8px 12px;
    border: 1px solid var(--ms5-border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--ms5-bg);
    color: var(--ms5-text);
    font-family: inherit;
}

.ms5-buy-form__row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ms5-buy-form__row label {
    font-size: 11px;
    font-weight: 700;
    color: var(--ms5-text-muted);
    text-transform: uppercase;
}
.ms5-buy-form__qty {
    width: 70px;
    padding: 8px 10px;
    border: 1px solid var(--ms5-border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--ms5-bg);
    color: var(--ms5-text);
    font-family: inherit;
}

/* ---------------------------------------------------------------------
   9. BUTTONS
   --------------------------------------------------------------------- */
.ms5-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid var(--ms5-red-dark);
    border-radius: 6px;
    background: var(--ms5-red);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.ms5-btn:hover {
    background: var(--ms5-red-hover);
    border-color: #991b1b;
    color: var(--ms5-yellow);
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(212, 0, 0, 0.3);
}

.ms5-btn--primary { background: var(--ms5-red); border-color: var(--ms5-red-dark); }
.ms5-btn--dark    { background: #1e293b;         border-color: #0f172a; }
.ms5-btn--dark:hover { background: #0f172a; color: var(--ms5-yellow); }
.ms5-btn--success { background: #16a34a;         border-color: #15803d; cursor: default; }
.ms5-btn--success:hover { background: #16a34a; transform: none; box-shadow: none; color: #fff; }
.ms5-btn--block   { width: 100%; }

.ms5-buy-btn {
 /*   font-size: 14px;
    padding: 12px 20px;*/
}

.ms5-btn--soldout {
    background: #64748b;
    border-color: #475569;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.85;
}
.ms5-btn--soldout:hover {
    background: #64748b;
    border-color: #475569;
    color: #fff;
    transform: none;
    box-shadow: none;
}

/* ---------------------------------------------------------------------
   10. NOTICES
   --------------------------------------------------------------------- */
.ms5-notice {
    padding: 14px 18px;
    border-radius: var(--ms5-radius);
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.6;
}
.ms5-notice--warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}
.ms5-notice--auction {
    background: #fef3c7;
    border-left: 4px solid #d40000;
    color: #7f1d1d;
    font-weight: 700;
}
.ms5-empty {
    padding: 24px;
    text-align: center;
    color: var(--ms5-text-muted);
}

/* ---------------------------------------------------------------------
   11. MODAL
   --------------------------------------------------------------------- */
.ms5-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ms5-modal[hidden] { display: none; }

.ms5-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
}

.ms5-modal__content {
    position: relative;
    background: var(--ms5-bg);
    border-radius: 12px;
    padding: 24px 28px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.ms5-modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--ms5-text-muted);
    cursor: pointer;
    padding: 4px 8px;
}
.ms5-modal__close:hover { color: var(--ms5-red); }

.ms5-modal__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--ms5-text);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ms5-border);
}

body.ms5-modal-open { overflow: hidden; }

/* ---------------------------------------------------------------------
   12. FORMS
   --------------------------------------------------------------------- */
.ms5-form label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--ms5-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 12px 0 4px;
}

.ms5-input,
.ms5-form input[type="text"],
.ms5-form input[type="email"],
.ms5-form input[type="number"],
.ms5-form textarea,
.ms5-form select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--ms5-border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--ms5-bg);
    color: var(--ms5-text);
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ms5-input:focus,
.ms5-form input:focus,
.ms5-form select:focus {
    outline: none;
    border-color: var(--ms5-red);
    box-shadow: 0 0 0 3px rgba(212, 0, 0, 0.12);
}

.ms5-form__hint {
    font-size: 12px;
    color: var(--ms5-text-muted);
    margin: 12px 0;
}

/* ---------------------------------------------------------------------
   13. VARIANTS (platte grid — geen chips/panels)
   --------------------------------------------------------------------- */
.ms5-variants {
    margin: 24px 0;
    padding: 20px 24px;
    background: var(--ms5-bg);
    border: 1px solid var(--ms5-border);
    border-radius: var(--ms5-radius);
}

.ms5-variant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.ms5-variant-card {
    border: 1px solid var(--ms5-border);
    border-radius: 10px;
    padding: 10px;
    text-decoration: none;
    background: var(--ms5-bg);
    transition: all 0.2s ease;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ms5-variant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border-color: var(--ms5-red);
    text-decoration: none;
}

.ms5-variant-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60px;
}
.ms5-variant-card__image img {
    max-width: 80%;
    max-height: 100%;
    object-fit: contain;
}

.ms5-variant-card__meta {
    font-size: 11px;
    text-align: center;
    line-height: 1.4;
}
.ms5-variant-card__qty  { font-weight: 700; color: var(--ms5-text); }
.ms5-variant-card__mfr  { color: var(--ms5-text-muted); }
.ms5-variant-card__cond { color: var(--ms5-text-muted); font-style: italic; }
.ms5-variant-card__sku  { font-size: 10px; color: #94a3b8; font-family: 'Courier New', monospace; }

/* ---------------------------------------------------------------------
   14. RELATED PRODUCTS
   --------------------------------------------------------------------- */
.ms5-related {
    margin: 24px 0;
}

/* ---------------------------------------------------------------------
   15. CART ANIMATION
   --------------------------------------------------------------------- */
.cart-toast {
    animation: ms5ToastIn 0.3s ease;
}
@keyframes ms5ToastIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------------
   16. RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 768px) {
    .ms5-product {
        padding: 12px;
        box-shadow: none;
    }
    .ms5-product__header {
        flex-direction: column;
        align-items: stretch;
    }
    .ms5-product__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .ms5-product__title { font-size: 20px; }
    .ms5-product__price { font-size: 18px; }
    .ms5-product__buy {
        flex-direction: column;
        align-items: stretch;
    }
    .ms5-buy-actions {
        justify-content: stretch;
        margin-left: 0;
        width: 100%;
    }
    .ms5-buy-actions .ms5-buy-btn {
        width: 100%;
        min-width: 0;
    }
    .ms5-specs th { width: 50%; font-size: 10px; }
    .ms5-specs th,
    .ms5-specs td { padding: 8px 10px; font-size: 12px; }
    .ms5-variant-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}

@media (max-width: 480px) {
    .ms5-product { padding: 8px; }
    .ms5-product__title { font-size: 18px; }
    .ms5-variant-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ---------------------------------------------------------------------
   Mijn veilingen — account overzicht
   --------------------------------------------------------------------- */
.ms5-account-auctions {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 8px 0;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.ms5-account-auctions thead tr {
    background: #fff5f5;
}
.ms5-account-auctions th {
    padding: 10px 12px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    color: #a80000;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid #d40000;
    white-space: nowrap;
}
.ms5-account-auctions td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}
.ms5-account-auctions tbody tr:nth-child(even) td {
    background: #fafbfc;
}
.ms5-account-auctions tbody tr:hover td {
    background: #fff5f5;
}
.ms5-account-auctions tbody tr:last-child td {
    border-bottom: none;
}
.ms5-account-auctions .main {
    font-size: 12px;
}
.ms5-account-auctions .ms5-highest {
    color: #16a34a;
    font-weight: 700;
}
.ms5-account-auctions .ms5-outbid {
    color: #ef4444;
    font-weight: 700;
}
.ms5-account-auctions .ms5-auc-countdown {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #16a34a;
}
.ms5-account-auctions .ms5-auc-countdown[data-end-ts] {
    /* wordt door countdown.js gevuld */
}