/* ─── Product Hotspots v2.1 ─── */

:root {
    --ph-primary: #e74c3c;
    --ph-primary-rgb: 231, 76, 60;
}

*, *::before, *::after { box-sizing: border-box; }

.ph-container {
    position: relative;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
}

.ph-image-wrap {
    position: relative;
    display: block;
    width: 100%;
    line-height: 0;
}

.ph-image {
    width: 100%;
    height: auto;
    display: block;
}

/* ═══════════════════════════════════════════
   DOTS — z-index 20, above overlay (z-index 4)
   ═══════════════════════════════════════════ */

.ph-hotspot {
    position: absolute;
    width: 40px; height: 40px;
    margin-left: -20px; margin-top: -20px;
    background: none; border: none;
    cursor: pointer; padding: 0;
    z-index: 20;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.ph-hotspot-inner {
    display: block;
    width: 14px; height: 14px;
    margin: 13px;
    background: #fff;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s, background 0.2s;
    position: relative; z-index: 2;
}

.ph-hotspot:hover .ph-hotspot-inner {
    transform: scale(1.4);
    background: var(--ph-primary);
    border-color: #fff;
}

.ph-hotspot-ping { display: none; }

.ph-style-pulse .ph-hotspot-ping {
    display: block;
    position: absolute;
    top: 50%; left: 50%;
    width: 30px; height: 30px;
    margin: -15px 0 0 -15px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    animation: phPulse 2.5s ease-out infinite;
    z-index: 1;
}

@keyframes phPulse {
    0%   { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

.ph-style-glow .ph-hotspot-inner {
    box-shadow: 0 0 14px 4px rgba(255,255,255,0.4), 0 2px 8px rgba(0,0,0,0.2);
}

.ph-gallery-dot .ph-hotspot-inner {
    width: 10px; height: 10px;
    margin: 15px;
}


/* ═══════════════════════════════════════════
   HOVER PREVIEW — position: fixed, max z-index
   ═══════════════════════════════════════════ */

.ph-hover-preview {
    position: fixed;
    z-index: 2147483647;
    width: 240px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.06);
    overflow: hidden;
    display: none;
}

.ph-hover-preview.visible {
    display: block;
}

.ph-hover-preview-img {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f5f5f5;
}

.ph-hover-preview-img img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}

.ph-hover-preview-body {
    padding: 12px 14px 14px;
    background: #1a1a1a;
}

.ph-hover-preview-name {
    margin: 0;
    font-size: 14px; font-weight: 700;
    color: #fff; line-height: 1.3;
}

.ph-hover-preview-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.ph-hover-preview-actions .ph-btn-wa { color: #1a1a1a; }
.ph-hover-preview-actions .ph-btn-ver--dark { color: rgba(255,255,255,0.7); }
.ph-hover-preview-actions .ph-btn-ver--dark:hover { color: #fff; }


/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */

.ph-btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #25D366;
    color: #1a1a1a !important;
    border-radius: 6px;
    font-size: 12px; font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    border: none; cursor: pointer;
    line-height: 1;
}

.ph-btn-wa:hover { background: #1fb855; color: #1a1a1a !important; text-decoration: none; }
.ph-btn-wa--sm { padding: 5px 10px; font-size: 11px; }

.ph-btn-ver {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px; font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    background: none; border: none;
    cursor: pointer; padding: 0;
    line-height: 1;
}

.ph-btn-ver svg { transition: transform 0.15s; }
.ph-btn-ver:hover svg { transform: translateX(2px); }
.ph-btn-ver--dark { color: #555; }
.ph-btn-ver--dark:hover { color: #1a1a1a; }

.ph-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px; font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    border: none; cursor: pointer;
    line-height: 1;
}

.ph-card-btn--wa {
    padding: 7px 14px;
    background: #25D366;
    color: #1a1a1a !important;
    border-radius: 6px;
}

.ph-card-btn--wa:hover { background: #1fb855; color: #1a1a1a !important; }

.ph-card-btn--more {
    padding: 0; background: none; color: #fff;
}

.ph-card-btn--more svg { transition: transform 0.15s; }
.ph-card-btn--more:hover svg { transform: translateX(3px); }


/* ═══════════════════════════════════════════
   FULLSCREEN
   ═══════════════════════════════════════════ */

.ph-fullscreen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100000;
    background: #fff;
    display: none;
}

.ph-fullscreen.open { display: flex; }

.ph-fs-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 40px; height: 40px;
    background: rgba(0,0,0,0.06);
    border: none; border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 10; color: #333;
}

.ph-fs-close:hover { background: rgba(0,0,0,0.12); }

.ph-fs-image {
    flex: 1;
    background: #f2f2f2;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden; min-width: 0;
}

.ph-fs-image .ph-image-wrap { width: 100%; height: 100%; }
.ph-fs-image .ph-image-wrap img { width: 100%; height: 100%; object-fit: contain; }

.ph-fs-sidebar {
    width: 380px; flex-shrink: 0;
    border-left: 1px solid #eee;
    display: flex; flex-direction: column;
    background: #fff;
}

.ph-fs-sidebar-header { padding: 20px 24px; border-bottom: 1px solid #eee; }

.ph-fs-sidebar-header h3 {
    margin: 0; font-size: 13px; font-weight: 700;
    color: #1a1a1a; text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ph-fs-sidebar-header p { margin: 4px 0 0; font-size: 12px; color: #999; }

.ph-fs-products { flex: 1; overflow-y: auto; }

.ph-fs-product {
    display: flex; gap: 14px;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.ph-fs-product:hover { background: #fafafa; }
.ph-fs-product:last-child { border-bottom: none; }

.ph-fs-product-img {
    width: 72px; height: 72px;
    border-radius: 6px;
    overflow: hidden; flex-shrink: 0;
    background: #f0f0f0;
}

.ph-fs-product-img img { width: 100%; height: 100%; object-fit: cover; }

.ph-fs-product-info { flex: 1; min-width: 0; }
.ph-fs-product-name { margin: 0; font-size: 14px; font-weight: 700; color: #1a1a1a; }
.ph-fs-product-price { display: none; }

.ph-fs-product-desc {
    margin: 4px 0 0; font-size: 12px; color: #888;
    line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

.ph-fs-product-actions {
    display: flex; gap: 12px;
    margin-top: 10px; align-items: center;
}

@media (max-width: 768px) {
    .ph-fullscreen.open { flex-direction: column; }
    .ph-fs-image { height: 40vh; flex: none; }
    .ph-fs-sidebar { width: 100%; flex: 1; border-left: none; border-top: 1px solid #eee; }
    .ph-fs-close { top: 10px; right: 10px; background: rgba(0,0,0,0.4); color: #fff; }
}


/* ═══════════════════════════════════════════
   GALLERY — Masonry (Pinterest-style)
   ═══════════════════════════════════════════ */

.ph-gallery {
    --ph-gallery-columns: 4;
    --ph-gallery-gap: 8px;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ph-gallery-header { text-align: center; margin-bottom: 28px; }
.ph-gallery-title { margin: 0 0 6px; font-size: 28px; font-weight: 800; color: #1a1a1a; }
.ph-gallery-subtitle { margin: 0; font-size: 15px; color: #777; max-width: 550px; margin-left: auto; margin-right: auto; }

/* Masonry via CSS columns */
.ph-gallery-grid {
    column-count: var(--ph-gallery-columns);
    column-gap: var(--ph-gallery-gap);
}

.ph-gallery-item {
    position: relative;
    break-inside: avoid;
    margin-bottom: var(--ph-gallery-gap);
}

.ph-gallery-image-wrap {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #ddd;
    border-radius: 0;
}

/* No fixed aspect-ratio — images keep natural height */
.ph-gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

/* 4 varied vertical sizes for staircase effect */
.ph-gallery-item:nth-child(4n+1) .ph-gallery-image-wrap { aspect-ratio: 3/4; }
.ph-gallery-item:nth-child(4n+2) .ph-gallery-image-wrap { aspect-ratio: 2/3; }
.ph-gallery-item:nth-child(4n+3) .ph-gallery-image-wrap { aspect-ratio: 3/5; }
.ph-gallery-item:nth-child(4n+4) .ph-gallery-image-wrap { aspect-ratio: 4/5; }

.ph-gallery-item:nth-child(4n+1) .ph-gallery-image,
.ph-gallery-item:nth-child(4n+2) .ph-gallery-image,
.ph-gallery-item:nth-child(4n+3) .ph-gallery-image,
.ph-gallery-item:nth-child(4n+4) .ph-gallery-image {
    width: 100%; height: 100%;
    object-fit: cover;
}

.ph-hover-zoom .ph-gallery-image-wrap:hover .ph-gallery-image {
    transform: scale(1.05);
}

.ph-gallery-count {
    display: none;
}

/* ─── OVERLAY: pointer-events NONE so dots underneath receive hover ─── */
.ph-gallery-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 40px 12px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 55%, transparent 100%);
    z-index: 15;
    pointer-events: none;
    border-radius: 0;
}

/* Only the buttons inside overlay receive clicks */
.ph-gallery-overlay .ph-card-btn,
.ph-gallery-overlay a {
    pointer-events: auto;
}

.ph-gallery-collection {
    display: block; font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: rgba(255,255,255,0.6); margin-bottom: 2px;
}

.ph-gallery-item-title {
    margin: 0 0 6px !important; font-size: 13px !important; font-weight: 800 !important;
    color: #fff !important; text-transform: uppercase;
    letter-spacing: 0.04em; line-height: 1.3 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.ph-gallery-actions {
    display: flex; align-items: center; gap: 12px;
}

@media (min-width: 769px) {
    .ph-gallery-actions {
        opacity: 0; transform: translateY(4px);
        transition: opacity 0.25s, transform 0.25s;
    }
    .ph-gallery-image-wrap:hover .ph-gallery-actions {
        opacity: 1; transform: translateY(0);
    }
}

@media (max-width: 1200px) { .ph-gallery-grid { column-count: 3 !important; } }
@media (max-width: 1024px) { .ph-gallery-grid { column-count: 2 !important; } }

@media (max-width: 768px) {
    .ph-gallery-grid { column-count: 2 !important; column-gap: 6px !important; }
    .ph-gallery-item { margin-bottom: 6px; }
    .ph-gallery-title { font-size: 22px; }
    .ph-gallery-overlay { padding: 30px 8px 8px; }
    .ph-gallery-item-title { font-size: 10px !important; margin-bottom: 4px !important; }
    .ph-gallery-actions { gap: 8px; }
    .ph-card-btn--wa { padding: 5px 8px; font-size: 10px; gap: 4px; }
    .ph-card-btn--wa svg { width: 12px; height: 12px; }
    .ph-card-btn--more { font-size: 10px; }
    .ph-card-btn--more svg { width: 12px; height: 12px; }
    .ph-gallery-collection { display: none; }
}

@media (max-width: 400px) {
    .ph-gallery-grid { column-count: 2 !important; column-gap: 6px !important; }
}
