.product-card-img img.product-photo { width:100%; height:100%; object-fit:cover; transition:transform 0.4s ease; }
.product-card:hover .product-photo { transform:scale(1.08); }
.product-card-actions { display:flex; gap:8px; flex-wrap:wrap; }
.btn-details { background:transparent; color:var(--ink); border:1.5px solid var(--cream-dark); padding:9px 14px; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:6px; transition:all 0.2s; }
.btn-details:hover { background:var(--cream-dark); }

.modal-overlay.product-modal {
    position: fixed;
    inset: 0;
    background: rgba(34, 24, 16, 0.58);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}
.modal-overlay.product-modal.active { display: flex; }

.product-modal .pd-sheet {
    background: var(--surface);
    border-radius: 18px;
    width: min(880px, 100%);
    max-height: min(90vh, 720px);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: pdIn 0.28s ease;
}
@keyframes pdIn {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.product-modal .modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    font-size: 20px;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    box-shadow: var(--shadow-sm);
}
.product-modal .modal-close:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.product-modal .pd-photo {
    background: linear-gradient(160deg, var(--brown-dark), var(--brown-mid));
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-modal .pd-photo .modal-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-modal .pd-photo .modal-icon {
    width: 88px;
    height: 88px;
    filter: brightness(0) invert(1);
    opacity: 0.45;
}

.product-modal .pd-info {
    padding: 32px 32px 0;
    max-height: min(90vh, 720px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.product-modal .pd-tag {
    align-self: flex-start;
    background: var(--cream);
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.product-modal .pd-name {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 28px;
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 14px;
}
.product-modal .pd-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--cream-dark);
}
.product-modal .pd-price {
    font-family: var(--font-num);
    font-size: 26px;
    font-weight: 700;
    color: var(--ink-2);
}
.product-modal .pd-stock {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--cream);
    color: var(--ink);
    white-space: nowrap;
}
.product-modal .pd-stock.is-ok  { background: var(--ok-bg); color: var(--ok-ink); }
.product-modal .pd-stock.is-low { background: var(--warn-bg); color: var(--warn-ink); }
.product-modal .pd-stock.is-out { background: var(--danger-bg); color: var(--danger-ink); }
.product-modal .pd-stock.is-mto { background: var(--surface-2); color: var(--violet-ink); }

.product-modal .pd-desc {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0 0 20px;
}

.product-modal .pd-block { margin-bottom: 16px; }
.product-modal .pd-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.product-modal .pd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.product-modal .pd-chip {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    background: var(--cream);
    border: 1px solid var(--cream-dark);
    padding: 5px 10px;
    border-radius: 6px;
}

.product-modal .pd-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    margin: 4px 0 20px;
}
.product-modal .pd-fact small {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.product-modal .pd-fact strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.product-modal .pd-actions {
    position: sticky;
    bottom: 0;
    margin: auto -32px 0;
    padding: 12px 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--surface);
}
.product-modal .pd-actions::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 16px;
    background: linear-gradient(rgba(255, 255, 255, 0), var(--surface));
    pointer-events: none;
}
.product-modal .pd-actions .btn-add-cart,
.product-modal .pd-actions .pd-inquire {
    width: 100%;
    justify-content: center;
    text-align: center;
}
.product-modal .pd-inquire {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--cream-dark);
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.product-modal .pd-inquire:hover { background: var(--cream); border-color: var(--brown-mid); }
.product-modal .pd-note {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: center;
}

.product-modal .qty-modal-box {
    max-width: 420px;
    width: 100%;
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: pdIn 0.28s ease;
}
.product-modal .qty-modal-box { max-height: 92vh; overflow-y: auto; }
.product-modal .qty-modal-box .modal-body { padding: 36px 28px 0; }
.product-modal .qty-kicker {
    text-align: center;
    color: var(--accent-ink);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
}
.product-modal .qty-modal-box .modal-name {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 22px;
    color: var(--ink);
    text-align: center;
    margin: 0 0 20px;
}
.product-modal .option-field { text-align: left; margin: 0 0 14px; }
.product-modal .option-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.product-modal .pd-price .price-from,
.product-price .price-from,
.slide-price .price-from {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: block;
    line-height: 1.2;
    margin-bottom: 2px;
    opacity: 0.78;
    font-family: inherit;
}
.product-modal .option-field select {
    width: 100%;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--cream-dark);
    background: var(--cream);
    font-size: 13px;
    color: var(--ink);
    font-family: inherit;
}
.product-modal .option-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
.product-modal .qty-stepper { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 8px 0 10px; }
.product-modal .qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--cream-dark);
    background: var(--surface);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    color: var(--ink);
}
.product-modal .qty-btn:hover:not(:disabled) { background: var(--brown-dark); color: #fff; border-color: var(--brown-dark); }
.product-modal .qty-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.product-modal .qty-value { font-size: 22px; font-weight: 800; min-width: 36px; text-align: center; color: var(--ink); }
.product-modal .qty-total { text-align: center; font-size: 15px; margin: 8px 0 16px; color: var(--text-muted); }
.product-modal .qty-total strong { color: var(--ink-2); font-family: var(--font-num); font-weight: 700; }
.product-modal .qty-actions { display: flex; flex-direction: column; gap: 8px; }
.qty-modal-box .modal-body { padding-bottom: 0; }
.qty-modal-box .qty-actions {
    position: sticky;
    bottom: 0;
    z-index: 1;
    margin: 0 -28px;
    padding: 12px 28px 28px;
    background: var(--surface);
}
.qty-modal-box .qty-actions .qty-total { margin: 0 0 4px; }
.qty-modal-box .qty-actions::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 16px;
    background: linear-gradient(rgba(255, 255, 255, 0), var(--surface));
    pointer-events: none;
}
.product-modal .qty-actions .btn-add-cart,
.product-modal .qty-actions .btn-details { width: 100%; justify-content: center; }

@media (max-width: 760px) {
    .product-modal .pd-sheet {
        grid-template-columns: 1fr;
        max-height: 92vh;
        overflow-y: auto;
    }
    .product-modal .pd-photo { min-height: 200px; height: 200px; }
    .product-modal .pd-info { padding: 20px 16px 22px; max-height: none; }
    .product-modal .pd-actions { position: static; margin: auto 0 0; padding: 0; }
    .product-modal .pd-actions::before { content: none; }
    .product-modal .pd-name { font-size: 22px; }
    .product-modal .option-row { grid-template-columns: 1fr; }
}

.pc-box { text-align: left; margin: 0 0 14px; display: flex; flex-direction: column; gap: 12px; }
.pc-box[hidden] { display: none; }
.pc-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.pc-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pc-mode { border: 1.5px solid var(--cream-dark); background: var(--surface); border-radius: 10px; padding: 9px 10px; text-align: left; cursor: pointer; font-family: inherit; color: var(--ink); transition: border-color .15s, background .15s; }
.pc-mode strong { display: block; font-size: 13px; }
.pc-mode small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pc-mode:hover:not(:disabled) { border-color: var(--brown-light, #3D2C20); }
.pc-mode.is-on { border-color: var(--brown-mid); background: var(--cream); box-shadow: inset 0 0 0 1px var(--brown-mid); }
.pc-mode:disabled { opacity: .45; cursor: not-allowed; }
.pc-box select { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1.5px solid var(--cream-dark); background: var(--cream); font-size: 13px; color: var(--ink); font-family: inherit; }
.pc-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.pc-check small { font-weight: 500; color: var(--text-muted); }
.pc-check input { width: 16px; height: 16px; accent-color: var(--brown-mid); }
.pc-dims { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.pc-dims label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pc-dims label > span:first-child { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pc-dims small { font-size: 11px; color: var(--text-muted); font-family: var(--font-num); }
.pc-dims small b { color: var(--ink-2); }
.pc-input { position: relative; display: block; }
.pc-input input { width: 100%; padding: 10px 34px 10px 12px; border: 1.5px solid var(--cream-dark); border-radius: 10px; background: var(--surface); font-size: 14px; font-family: var(--font-num); color: var(--ink); outline: none; -moz-appearance: textfield; appearance: textfield; }
.pc-input input::-webkit-outer-spin-button, .pc-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pc-input input:focus { border-color: var(--gold); box-shadow: var(--focus); }
.pc-input em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 11px; font-weight: 600; color: var(--text-muted); pointer-events: none; }
.pc-hint { font-size: 11.5px; color: var(--text-muted); margin: 6px 0 0; line-height: 1.45; }
.pc-error { font-size: 12px; color: var(--danger-ink); margin: 4px 0 0; min-height: 0; }
.pc-error:empty { display: none; }
.pc-notice { font-size: 12px; color: var(--warn-ink); background: var(--warn-bg); border-left: 3px solid var(--gold); border-radius: 6px; padding: 8px 10px; margin: 0; line-height: 1.45; }
#qtySizeSelect:disabled { opacity: .55; cursor: not-allowed; }
