/* ===== PRODUCT PAGE ===== */

/* ---- Content wrapper ---- */
.product-content {
    padding: 1.5rem 2rem 3rem;
    font-family: var(--font-b);
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    font-family: monospace;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { opacity: 0.3; }

.breadcrumb span:last-child {
    color: var(--accent);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* ---- Product Layout ---- */
.product-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
    max-width: 1100px;
    margin: 0 auto 2rem;
}

/* ---- Gallery ---- */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.gallery-main {
    position: relative;
    width: 100%;
    max-height: 460px;
    background: #0a0c14;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main img {
    max-width: 100%;
    max-height: 460px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    cursor: zoom-in;
    transition: transform 0.4s ease;
}

.gallery-main img:hover { transform: scale(1.02); }

.gallery-main .gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.3;
}

/* Gallery arrows */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(0,219,180, 0.15);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 5;
    backdrop-filter: blur(6px);
    opacity: 0;
}

.gallery-main:hover .gallery-arrow { opacity: 1; }
.gallery-arrow:hover { background: rgba(0,219,180, 0.5); border-color: var(--accent); }
.gallery-arrow.left  { left: 10px; }
.gallery-arrow.right { right: 10px; }

/* Gallery counter */
.gallery-counter {
    position: absolute;
    bottom: 8px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
    font-family: monospace;
    padding: 3px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0,219,180, 0.15);
}

/* Thumbnails */
.gallery-thumbs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
    opacity: 0.6;
}

.gallery-thumb:hover { opacity: 0.9; border-color: rgba(0,219,180, 0.3); }

.gallery-thumb.active {
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(0,219,180, 0.2);
    opacity: 1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- Product Info ---- */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.product-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,219,180,.06);
    color: var(--accent);
    border: 1px solid rgba(0,219,180, 0.2);
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    width: fit-content;
    font-family: monospace;
}

.product-name {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.product-meta-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.product-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* Price block */
.product-price-block {
    background: linear-gradient(135deg, rgba(0,219,180, 0.06) 0%, rgba(0,219,180, 0.04) 100%);
    border: 1px solid rgba(0,219,180, 0.12);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.product-price-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 4px;
    font-family: monospace;
}

.product-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.5px;
    line-height: 1.2;
    font-family: monospace;
    text-shadow: 0 0 20px rgba(0,219,180, 0.2);
}

/* Description block */
.product-desc-block {
    flex: 1;
    margin-bottom: 1.5rem;
}

.product-desc-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-family: monospace;
}

.product-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.product-desc p      { margin-bottom: 0.6rem; }
.product-desc h3,
.product-desc h4     { color: var(--text-primary); margin: 0.75rem 0 0.4rem; font-size: 1rem; }
.product-desc ul,
.product-desc ol     { padding-left: 1.5rem; margin: 0.5rem 0; }
.product-desc li     { margin-bottom: 0.3rem; }
.product-desc a      { color: var(--accent); text-decoration: underline; }
.product-desc strong { color: var(--text-primary); font-weight: 600; }

.product-desc code {
    background: rgba(0,219,180, 0.08);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85em;
}

.product-desc pre {
    background: var(--bg-base);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.75rem 0;
    font-size: 0.82em;
    font-family: monospace;
}

.product-desc blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    margin: 0.75rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.product-desc img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0.5rem 0;
    cursor: zoom-in;
    display: block;
    transition: opacity 0.2s;
    border: 1px solid var(--border);
}

.product-desc img:hover { opacity: 0.9; }

/* ---- CTA Buttons ---- */
.product-cta {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.btn-contact {
    flex: 1;
    min-width: 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #0088cc, #006fa8);
    color: #fff;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    cursor: pointer;
    border: 1px solid rgba(0, 136, 204, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-contact::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.btn-contact:hover::before { transform: translateX(100%); }

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,136,204,0.35);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.25rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-back:hover {
    background: rgba(0,219,180,.06);
    color: var(--accent);
    border-color: rgba(0,219,180, 0.2);
}

/* ---- Lightbox ---- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.96);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: lbFadeIn 0.2s ease;
}

.lightbox.show { display: flex; }

@keyframes lbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lightbox-img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 6px;
    transition: transform 0.15s ease-out;
    transform-origin: center;
    user-select: none;
    -webkit-user-drag: none;
    cursor: grab;
    display: block;
}

.lightbox-img.grabbing { cursor: grabbing; }

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.15);
    transform: rotate(90deg);
}

.lightbox-controls {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.7);
    padding: 6px 12px;
    border-radius: 30px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0,219,180, 0.1);
}

.lightbox-zoom-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.lightbox-zoom-btn:hover { background: rgba(0,219,180, 0.3); border-color: var(--accent); }

.lightbox-zoom-level {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    font-family: monospace;
}

/* Lightbox nav arrows */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(0,219,180, 0.12);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.lightbox-arrow:hover { background: rgba(0,219,180, 0.4); border-color: var(--accent); }
.lightbox-arrow.left  { left: 1.25rem; }
.lightbox-arrow.right { right: 1.25rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .product-content { padding: 1.25rem 1.25rem 2rem; }
}

@media (max-width: 768px) {
    .product-content  { padding: 1rem; }
    .product-name     { font-size: 1.25rem; }
    .product-price    { font-size: 1.5rem; }
    .lightbox-arrow   { display: none; }
    .gallery-arrow { opacity: 1; }
}

@media (max-width: 480px) {
    .product-content  { padding: 0.75rem; }
    .product-name     { font-size: 1.1rem; }
    .product-price    { font-size: 1.3rem; }
    .gallery-thumb    { width: 52px; height: 40px; }
    .product-cta      { flex-direction: column; }
    .btn-contact      { min-width: auto; }
    .product-price-block { padding: 0.75rem 1rem; }
}
