/* ============================================================
   Gold Price Manager — Frontend CSS
   Luxury jewellery product grid for customer-facing pages
   ============================================================ */

:root {
    --gmp-f-gold:       #b8861e;
    --gmp-f-gold-light: #d4a853;
    --gmp-f-navy:       #1a1f3a;
    --gmp-f-bg:         #faf8f4;
    --gmp-f-white:      #ffffff;
    --gmp-f-border:     #e8e0d0;
    --gmp-f-text:       #2c2c2c;
    --gmp-f-muted:      #888;
    --gmp-f-radius:     10px;
    --gmp-f-shadow:     0 4px 20px rgba(0,0,0,0.08);
    --gmp-f-shadow-hover: 0 12px 36px rgba(0,0,0,0.15);
    --gmp-f-wa:         #25d366;
    --gmp-f-wa-hover:   #1fb855;
}

/* ── Grid ─────────────────────────────────────────────────── */
.gmp-grid {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}
.gmp-cols-2 { grid-template-columns: repeat(2, 1fr); }
.gmp-cols-3 { grid-template-columns: repeat(3, 1fr); }
.gmp-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Product Card ─────────────────────────────────────────── */
.gmp-product {
    background: var(--gmp-f-white);
    border: 1px solid var(--gmp-f-border);
    border-radius: var(--gmp-f-radius);
    overflow: hidden;
    box-shadow: var(--gmp-f-shadow);
    transition: transform 0.3s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.3s ease;
    position: relative;
}
.gmp-product:hover {
    transform: translateY(-5px);
    box-shadow: var(--gmp-f-shadow-hover);
}
.gmp-product.gmp-out-of-stock {
    opacity: 0.75;
}

/* Image */
.gmp-product__image-wrap {
    position: relative;
    overflow: hidden;
    background: var(--gmp-f-bg);
    aspect-ratio: 1 / 1;
}
.gmp-product__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.gmp-product:hover .gmp-product__image {
    transform: scale(1.06);
}

/* Badge */
.gmp-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.gmp-badge--oos {
    background: rgba(30,30,30,0.8);
    color: white;
    backdrop-filter: blur(4px);
}

/* Body */
.gmp-product__body {
    padding: 16px;
}
.gmp-product__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--gmp-f-navy);
    margin: 0 0 6px;
    line-height: 1.3;
}
.gmp-product__desc {
    font-size: 13px;
    color: var(--gmp-f-muted);
    margin: 0 0 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta tags */
.gmp-product__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}
.gmp-tag {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
}
.gmp-tag--karat {
    background: var(--gmp-f-navy);
    color: #d4a853;
}
.gmp-tag--weight {
    background: #f0ece4;
    color: var(--gmp-f-gold);
}
.gmp-tag--cat {
    background: #f5f5f5;
    color: #666;
}

/* Price */
.gmp-product__price-wrap {
    margin-bottom: 14px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #faf7f0 0%, #f5f0e8 100%);
    border-radius: 7px;
    border: 1px solid #e8dfc8;
}
.gmp-product__price {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--gmp-f-gold);
    line-height: 1.2;
    font-family: Georgia, serif;
}
.gmp-product__price-note {
    font-size: 11px;
    color: var(--gmp-f-muted);
}
.gmp-price--na {
    font-size: 14px;
    color: #aaa;
    font-style: italic;
    font-weight: 400;
}

/* WhatsApp button */
.gmp-btn--whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 10px 16px;
    background: var(--gmp-f-wa);
    color: white;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}
.gmp-btn--whatsapp:hover {
    background: var(--gmp-f-wa-hover);
    color: white;
    text-decoration: none;
    transform: scale(1.02);
}

/* ── Empty state ──────────────────────────────────────────── */
.gmp-empty {
    text-align: center;
    color: var(--gmp-f-muted);
    padding: 40px;
    font-style: italic;
}

/* ── Rate Display ─────────────────────────────────────────── */
.gmp-rate-display {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
    align-items: center;
}
.gmp-rate-item {
    background: var(--gmp-f-white);
    border: 1px solid var(--gmp-f-border);
    border-radius: 8px;
    padding: 12px 18px;
    text-align: center;
    box-shadow: var(--gmp-f-shadow);
    min-width: 110px;
}
.gmp-rate-karat {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: var(--gmp-f-navy);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.gmp-rate-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--gmp-f-gold);
}
.gmp-rate-value small { font-size: 11px; color: var(--gmp-f-muted); font-weight: 400; }
.gmp-rate-updated {
    font-size: 11px;
    color: var(--gmp-f-muted);
    margin: 4px 0 0;
    width: 100%;
}

/* ── Ticker ───────────────────────────────────────────────── */
.gmp-ticker {
    background: var(--gmp-f-navy);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    flex-wrap: wrap;
}
.gmp-ticker__label {
    font-weight: 700;
    color: var(--gmp-f-gold-light);
    white-space: nowrap;
}
.gmp-ticker__rates { color: #c0caec; }
.gmp-ticker__rates strong { color: var(--gmp-f-gold-light); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .gmp-cols-3, .gmp-cols-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 540px) {
    .gmp-cols-2, .gmp-cols-3, .gmp-cols-4,
    .gmp-mob-cols-1 { grid-template-columns: 1fr; }
    .gmp-mob-cols-2  { grid-template-columns: repeat(2,1fr); }
    .gmp-product__price { font-size: 18px; }
}

/* ── V2: Filter Tabs ──────────────────────────────────────── */
.gmp-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gmp-f-border);
}
.gmp-ftab {
    padding: 7px 18px;
    border: 1px solid var(--gmp-f-border);
    background: var(--gmp-f-white);
    border-radius: 50px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--gmp-f-text);
    transition: all 0.2s ease;
}
.gmp-ftab:hover { border-color: var(--gmp-f-gold); color: var(--gmp-f-gold); }
.gmp-ftab--active { background: var(--gmp-f-navy); color: var(--gmp-f-gold-light) !important; border-color: var(--gmp-f-navy); }
.gmp-ftab--karat { font-family: monospace; }
.gmp-product { transition: all 0.35s ease; }
.gmp-product.gmp-hidden { opacity: 0; transform: scale(0.95); pointer-events: none; position: absolute; }
.gmp-grid { position: relative; }

/* ── V2: Lightbox ─────────────────────────────────────────── */
.gmp-image-overlay {
    position: absolute; inset: 0;
    background: rgba(10,15,40,0);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.3s ease;
    cursor: pointer;
}
.gmp-image-overlay span {
    color: white; font-size: 14px; font-weight: 700;
    opacity: 0; transition: opacity 0.3s ease;
    background: rgba(0,0,0,0.55); padding: 8px 16px; border-radius: 50px;
}
.gmp-product__image-wrap:hover .gmp-image-overlay { background: rgba(10,15,40,0.35); }
.gmp-product__image-wrap:hover .gmp-image-overlay span { opacity: 1; }
.gmp-product__image-wrap[data-lightbox] { cursor: pointer; }

.gmp-lightbox {
    position: fixed; inset: 0; z-index: 999999;
    display: flex; align-items: center; justify-content: center;
}
.gmp-lightbox__backdrop {
    position: absolute; inset: 0;
    background: rgba(5,8,20,0.92);
    backdrop-filter: blur(6px);
}
.gmp-lightbox__inner {
    position: relative; z-index: 1;
    max-width: 90vw; max-height: 90vh;
    display: flex; flex-direction: column; align-items: center;
    gap: 12px;
}
.gmp-lightbox__img-wrap {
    position: relative;
    max-width: min(700px, 90vw);
    max-height: 70vh;
    display: flex; align-items: center; justify-content: center;
}
.gmp-lightbox__img {
    max-width: 100%; max-height: 68vh;
    object-fit: contain; border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    transition: opacity 0.2s ease;
}
.gmp-lightbox__close,
.gmp-lightbox__prev,
.gmp-lightbox__next {
    position: absolute;
    background: rgba(255,255,255,0.15);
    color: white; border: none; cursor: pointer;
    border-radius: 50%; width: 44px; height: 44px;
    font-size: 20px; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}
.gmp-lightbox__close { top: -50px; right: -50px; }
.gmp-lightbox__prev  { left: -60px; top: 50%; transform: translateY(-50%); font-size: 24px; }
.gmp-lightbox__next  { right: -60px; top: 50%; transform: translateY(-50%); font-size: 24px; }
.gmp-lightbox__close:hover,
.gmp-lightbox__prev:hover,
.gmp-lightbox__next:hover { background: rgba(200,151,61,0.7); }
.gmp-lightbox__prev[disabled],
.gmp-lightbox__next[disabled] { opacity: 0.3; cursor: default; }
.gmp-lightbox__caption { color: white; font-size: 15px; font-weight: 600; }
.gmp-lightbox__counter { color: rgba(255,255,255,0.5); font-size: 12px; }
.gmp-lightbox__thumbs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 600px; }
.gmp-lightbox__thumb {
    width: 52px; height: 52px; object-fit: cover; border-radius: 5px;
    cursor: pointer; opacity: 0.5; transition: opacity .2s, transform .2s;
    border: 2px solid transparent;
}
.gmp-lightbox__thumb:hover { opacity: 0.85; transform: scale(1.05); }
.gmp-lightbox__thumb.gmp-lb-active { opacity: 1; border-color: var(--gmp-f-gold-light); }

/* ── V2: Featured badge ───────────────────────────────────── */
.gmp-badge--featured {
    top: 10px; left: 10px; right: auto;
    background: linear-gradient(135deg, #b8861e, #d4a853);
    color: white; font-size: 11px;
}
.gmp-badge--gallery {
    bottom: 10px; right: 10px; top: auto;
    background: rgba(10,15,40,0.7); color: white;
    backdrop-filter: blur(4px); font-size: 11px;
}
/* ── V2: Live rate dot ────────────────────────────────────── */
.gmp-live-dot {
    display: inline-block; width: 8px; height: 8px;
    background: #e53935; border-radius: 50%;
    animation: gmp-pulse 1.5s infinite;
    margin-right: 8px; vertical-align: middle;
}
@keyframes gmp-pulse {
    0%,100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.4); opacity: 0.6; }
}
.gmp-live-badge { display: inline-block; background: #e53935; color: white; font-size: 11px; padding: 2px 7px; border-radius: 50px; font-weight: 600; }
/* Mobile lightbox */
@media (max-width:600px) {
    .gmp-lightbox__prev { left: 4px; }
    .gmp-lightbox__next { right: 4px; }
    .gmp-lightbox__close { top: 8px; right: 8px; }
    .gmp-lightbox__thumbs { display: none; }
}

/* ── V3: Enquiry form modal ───────────────────────────────── */
.gmp-enq-modal {
    position:fixed; inset:0; z-index:999998;
    display:flex; align-items:center; justify-content:center;
}
.gmp-enq-backdrop { position:absolute; inset:0; background:rgba(5,8,20,0.75); backdrop-filter:blur(4px); }
.gmp-enq-inner {
    position:relative; z-index:1;
    background:white; border-radius:14px;
    width:min(480px,94vw); padding:28px;
    box-shadow:0 20px 60px rgba(0,0,0,0.3);
    animation:gmpSlideUp .25s ease;
}
@keyframes gmpSlideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }
.gmp-enq-close {
    position:absolute; top:14px; right:16px; background:none; border:none;
    font-size:20px; cursor:pointer; color:#888; line-height:1;
}
.gmp-enq-close:hover { color:#1a1f3a; }
.gmp-enq-header { margin-bottom:18px; }
.gmp-enq-title { font-size:18px; font-weight:800; color:#1a1f3a; margin:0 0 4px; }
.gmp-enq-product-ref { font-size:13px; color:#b8861e; font-style:italic; }
.gmp-enq-form .gmp-enq-field { margin-bottom:14px; }
.gmp-enq-form .gmp-enq-field label { display:block; font-size:12px; font-weight:700; color:#1a1f3a; text-transform:uppercase; letter-spacing:.03em; margin-bottom:5px; }
.gmp-enq-form input,
.gmp-enq-form textarea,
.gmp-enq-form select {
    width:100%; padding:10px 12px; border:1px solid #e8e0d0; border-radius:7px;
    font-size:13px; font-family:inherit; transition:border-color .2s;
}
.gmp-enq-form input:focus,
.gmp-enq-form textarea:focus { border-color:#b8861e; outline:none; box-shadow:0 0 0 3px rgba(184,134,30,.12); }
.gmp-enq-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.gmp-enq-footer { display:flex; align-items:center; justify-content:space-between; margin-top:18px; gap:12px; }
.gmp-enq-msg { font-size:13px; font-weight:600; flex:1; }
.gmp-enq-msg--success { color:#2e7d32; }
.gmp-enq-msg--error   { color:#c62828; }
/* Standalone form */
.gmp-standalone-form { background:#faf8f4; border:1px solid #e8e0d0; border-radius:10px; padding:24px; }
.gmp-standalone-form h3 { color:#1a1f3a; margin:0 0 6px; }
/* Multi-currency */
.gmp-multi-currency { display:flex; gap:8px; flex-wrap:wrap; margin-top:5px; }
.gmp-currency-alt { font-size:12px; color:#888; background:#f5f5f5; padding:2px 7px; border-radius:4px; }
/* Print button */
.gmp-btn--print { display:inline-flex; align-items:center; gap:6px; padding:10px 20px; background:#1a1f3a; color:#d4a853; border-radius:7px; font-size:14px; font-weight:700; text-decoration:none; transition:background .2s; }
.gmp-btn--print:hover { background:#252b4a; color:#d4a853; text-decoration:none; }
/* Enquire button on card */
.gmp-btn--enquire {
    display:flex; align-items:center; justify-content:center; gap:6px;
    width:100%; padding:9px 14px; margin-top:6px;
    background:#f0ece4; color:#1a1f3a; border:1px solid #e0d8c8; border-radius:7px;
    font-size:13px; font-weight:700; cursor:pointer; transition:all .2s;
}
.gmp-btn--enquire:hover { background:#1a1f3a; color:#d4a853; border-color:#1a1f3a; }
.gmp-btn--primary { background:#1a1f3a; color:white; border:none; padding:10px 22px; border-radius:7px; font-size:13px; font-weight:700; cursor:pointer; transition:background .2s; }
.gmp-btn--primary:hover { background:#252b4a; }
