/* ═══════════════════════════════════════════════════════════════
   PRODUCT DETAIL PAGE  —  producto.css
   Minimalist Redesign
═══════════════════════════════════════════════════════════════ */

/* ── BREADCRUMB ─────────────────────────────────────────────── */
.prod-breadcrumb {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 0;
    font-size: 13px;
}
.prod-breadcrumb .breadcrumb {
    background: none; padding: 0; margin: 0; font-size: 13px;
}
.prod-breadcrumb .breadcrumb-item a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.15s;
}
.prod-breadcrumb .breadcrumb-item a:hover { color: #c0282d; }
.prod-breadcrumb .breadcrumb-item.active { color: #111827; font-weight: 500; }
.prod-breadcrumb .breadcrumb-item + .breadcrumb-item::before { content: "/"; color: #d1d5db; padding: 0 10px; }

/* ── PAGE WRAPPER ───────────────────────────────────────────── */
.prod-section {
    padding: 40px 0 80px;
    background: #f9fafb;
    min-height: 70vh;
}

/* ── MAIN CARD ──────────────────────────────────────────────── */
.prod-main-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.03);
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* ── GALLERY ────────────────────────────────────────────────── */
.prod-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 20px;
}

.prod-main-img-wrap {
    border-radius: 12px;
    overflow: hidden;
    background: #fafafa;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid #f0f0f0;
}
.prod-main-img-wrap img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 24px;
    transition: transform 0.4s ease;
}
.prod-main-img-wrap:hover img { transform: scale(1.05); }

.prod-thumb-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.prod-thumb {
    width: 72px; height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.prod-thumb img {
    width: 100%; height: 100%; object-fit: contain; padding: 6px;
}
.prod-thumb.active { border-color: #c0282d; }
.prod-thumb:hover:not(.active) {
    border-color: #e5e7eb;
    transform: translateY(-2px);
}

/* ── PRODUCT INFO ────────────────────────────────────────────── */
.prod-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prod-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.prod-tag {
    background: #f3f4f6;
    color: #374151;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.prod-tag.marca {
    background: #fef2f2;
    color: #c0282d;
}

.prod-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    margin: 0;
    letter-spacing: -0.3px;
}

.prod-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
}
.prod-stock-badge i { font-size: 14px; }
.prod-stock-badge.in-stock  { background: #ecfdf5; color: #059669; }
.prod-stock-badge.consultar { background: #fffbeb; color: #d97706; }
.prod-stock-badge.no-stock  { background: #fef2f2; color: #dc2626; }

.prod-divider {
    border: none;
    border-top: 1px solid #f3f4f6;
    margin: 4px 0;
}

/* ── PRICE BLOCK ─────────────────────────────────────────────── */
.prod-price-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 0;
}
.prod-price-label {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
}
.prod-price {
    font-size: 36px;
    font-weight: 800;
    color: #c0282d;
    letter-spacing: -1px;
    line-height: 1.1;
}
.prod-price-note {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.5;
}

/* ── QUICK SPECS ─────────────────────────────────────────────── */
.prod-quick-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}
.prod-spec-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.prod-spec-key {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: 0.5px;
}
.prod-spec-val {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

/* ── QUANTITY SELECTOR ───────────────────────────────────────── */
.prod-qty-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.prod-qty-label {
    font-size: 14px;
    color: #374151;
    font-weight: 600;
}
.prod-qty-wrap {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.prod-qty-btn {
    background: #f9fafb;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    color: #374151;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}
.prod-qty-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Input quantity - Override theme's input[type=number] styles */
.prod-qty-wrap .prod-qty-input,
input[type="number"].prod-qty-input,
.prod-qty-input {
    width: 52px !important;
    height: 40px !important;
    border: none !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    background: #fff !important;
    border-left: 1px solid #e5e7eb !important;
    border-right: 1px solid #e5e7eb !important;
    -moz-appearance: textfield !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    line-height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #111827 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.prod-qty-input::-webkit-inner-spin-button,
.prod-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
    display: none !important;
}
.prod-qty-input:focus {
    outline: none !important;
    background: #f9fafb !important;
}

/* ── ACTION BUTTONS ──────────────────────────────────────────── */
.prod-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 16px 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    letter-spacing: 0.2px;
}
.btn-whatsapp:hover {
    background: #16a34a;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}
.btn-whatsapp svg { flex-shrink: 0; }

.btn-add-quote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    color: #c0282d;
    border: 2px solid #c0282d;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    letter-spacing: 0.2px;
}
.btn-add-quote:hover {
    background: #c0282d;
    color: #fff;
    transform: translateY(-1px);
}
.btn-add-quote.added {
    background: #c0282d;
    color: #fff;
}

/* ── SPECS SECTION ──────────────────────────────────────────── */
.prod-specs-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.03);
    padding: 32px 40px;
    margin-top: 24px;
}
.prod-specs-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 10px;
}
.prod-specs-section h3 i {
    color: #c0282d;
    font-size: 16px;
}

.prod-specs-table {
    width: 100%;
    border-collapse: collapse;
}
.prod-specs-table tr:nth-child(odd) td { background: #f9fafb; }
.prod-specs-table td {
    padding: 14px 20px;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}
.prod-specs-table td:first-child {
    font-weight: 600;
    color: #6b7280;
    width: 30%;
}
.prod-specs-table td:last-child {
    color: #111827;
    font-weight: 500;
}
.prod-specs-table tr:first-child td { border-top-left-radius: 8px; border-top-right-radius: 8px; }
.prod-specs-table tr:last-child td { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-bottom: none; }

/* ── DESCRIPTION ─────────────────────────────────────────────── */
.prod-description {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.8;
    margin-top: 8px;
}

/* Rendered HTML from Syscom API */
.prod-description-html {
    white-space: normal;
    font-family: inherit;
    color: inherit;
}
.prod-description-html img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
    display: block;
    margin: 16px auto !important;
}
.prod-description-html video {
    max-width: 100% !important;
    border-radius: 12px;
    display: block;
    margin: 16px auto !important;
}
.prod-description-html h3 {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-top: 24px !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    opacity: 1 !important;
}
.prod-description-html ul {
    padding-left: 24px !important;
    margin-bottom: 16px !important;
    font-size: 14px !important;
    color: #4b5563 !important;
}
.prod-description-html li {
    margin-bottom: 8px !important;
    line-height: 1.6 !important;
}
.prod-description-html strong { color: #111827; }
.prod-description-html a {
    color: #c0282d !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}
.prod-description-html a:hover { text-decoration: underline !important; }
.prod-description-html > div {
    max-width: 100% !important;
    margin: 0 auto !important;
    font-family: inherit !important;
    line-height: 1.7 !important;
    color: inherit !important;
    background-color: transparent !important;
}

/* ── FLOATING CART ──────────────────────────────────────────── */
.float-cart-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    background: #c0282d;
    color: #fff;
    border: none;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(192,40,45,0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 20px;
}
.float-cart-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 28px rgba(192,40,45,0.4);
}

.float-cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #111827;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* ── CART DRAWER ─────────────────────────────────────────────── */
.cart-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: 1150;
    backdrop-filter: blur(4px);
}
.cart-drawer-overlay.open { display: block; }

.cart-drawer {
    position: fixed;
    top: 0;
    right: -440px;
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 1200;
    box-shadow: -8px 0 40px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}
.cart-drawer.open { right: 0; }

.cart-drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cart-drawer-header h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cart-drawer-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #9ca3af;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
.cart-drawer-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.cart-empty-msg {
    text-align: center;
    padding: 48px 24px;
    color: #9ca3af;
}
.cart-empty-msg i {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.cart-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}
.cart-item-img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: #f9fafb;
    border-radius: 10px;
    overflow: hidden;
}
.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #c0282d;
    margin-top: 6px;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 2px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.cart-item-qty button {
    background: #f9fafb;
    border: none;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.cart-item-qty button:hover { background: #e5e7eb; }
.cart-item-qty span {
    width: 28px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}
.cart-item-remove {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    transition: color 0.15s;
}
.cart-item-remove:hover { color: #ef4444; }

.cart-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f9fafb;
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-total-label {
    font-size: 14px;
    color: #6b7280;
}
.cart-total-price {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
}
.cart-total-note {
    font-size: 11px;
    color: #9ca3af;
}

.btn-quote-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    width: 100%;
}
.btn-quote-all:hover {
    background: #16a34a;
    color: #fff;
    text-decoration: none;
}

.btn-clear-cart {
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: color 0.15s;
}
.btn-clear-cart:hover { color: #ef4444; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 991px) {
    .prod-main-card {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 32px;
    }
    .prod-gallery {
        max-width: 100%;
        position: static;
    }
    .prod-title { font-size: 20px; }
    .prod-price { font-size: 28px; }
    .prod-quick-specs { grid-template-columns: repeat(2, 1fr); }
    .prod-specs-section { padding: 24px; }
    .cart-drawer { width: 100%; right: -100%; }
    .cart-drawer.open { right: 0; }
}

@media (max-width: 575px) {
    .prod-section { padding: 24px 0 60px; }
    .prod-main-card { padding: 20px 16px; }
    .prod-specs-section { padding: 20px 16px; }
    .float-cart-btn {
        bottom: 20px;
        right: 16px;
        width: 52px;
        height: 52px;
    }
    .prod-quick-specs {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .prod-title { font-size: 18px; }
    .prod-price { font-size: 26px; }
    .btn-whatsapp,
    .btn-add-quote {
        padding: 14px 20px;
        font-size: 14px;
    }
    .prod-thumb { width: 60px; height: 60px; }
}
