/* ══════════════════════════════════════════════════════
   Ceramiza Products – Front-End Stylesheet
   Matches the product page design in the brief screenshot
   ══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
    --cpp-primary:      #5a7a6a;
    --cpp-primary-dark: #3d5c4d;
    --cpp-primary-light:#eef4f1;
    --cpp-accent:       #c17f3a;
    --cpp-sale:         #c0392b;
    --cpp-text:         #1e2a22;
    --cpp-text-muted:   #6b7280;
    --cpp-border:       #e2e8f0;
    --cpp-bg:           #fafaf8;
    --cpp-white:        #ffffff;
    --cpp-wa-green:     #25d366;
    --cpp-wa-dark:      #128c7e;
    --cpp-shadow:       0 2px 16px rgba(30,42,34,.08);
    --cpp-radius:       10px;
    --cpp-font-display: 'Cormorant Garamond', Georgia, serif;
    --cpp-font-body:    'DM Sans', system-ui, sans-serif;
}

/* ── Reset / Base ── */
.cpp-product-wrap *,
.cpp-product-wrap *::before,
.cpp-product-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
.cpp-product-wrap {
    font-family: var(--cpp-font-body);
    color: var(--cpp-text);
    background: var(--cpp-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Container ── */
.cpp-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ══════════════════════════════════════════
   PRODUCT SECTION
══════════════════════════════════════════ */
.cpp-product-section {
    padding: 48px 0 56px;
    background: var(--cpp-white);
}

.cpp-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}
@media (max-width: 860px) {
    .cpp-product-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ── Gallery ── */
.cpp-gallery { position: relative; }

.cpp-gallery-main {
    position: relative;
    background: #f5f6f4;
    border-radius: var(--cpp-radius);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--cpp-border);
}
.cpp-gallery-main .cpp-slide {
    display: none;
    width: 100%;
    height: 100%;
}
.cpp-gallery-main .cpp-slide.active { display: block; }
.cpp-gallery-main .cpp-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform .3s ease;
}
.cpp-gallery-main:hover .cpp-slide.active img { transform: scale(1.03); }

/* Zoom button */
.cpp-zoom {
    position: absolute;
    top: 12px; right: 12px;
    z-index: 10;
    background: rgba(255,255,255,.9);
    border: 1px solid var(--cpp-border);
    border-radius: 6px;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--cpp-text-muted);
    transition: all .2s;
    backdrop-filter: blur(4px);
}
.cpp-zoom:hover {
    background: var(--cpp-white);
    color: var(--cpp-primary);
    border-color: var(--cpp-primary);
}

/* Thumbnails */
.cpp-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.cpp-thumb {
    width: 72px; height: 72px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--cpp-border);
    cursor: pointer;
    transition: border-color .2s, transform .15s;
    background: #f5f6f4;
    flex-shrink: 0;
}
.cpp-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.cpp-thumb:hover { border-color: var(--cpp-primary); transform: translateY(-1px); }
.cpp-thumb.active {
    border-color: var(--cpp-primary);
    box-shadow: 0 0 0 1px var(--cpp-primary);
}

/* ── Product Info ── */
.cpp-product-info { padding-top: 4px; }

/* Stars */
.cpp-stars {
    color: #e8a838;
    font-size: .95rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cpp-review-count {
    color: var(--cpp-text-muted);
    font-size: .82rem;
    font-family: var(--cpp-font-body);
}

/* Title */
.cpp-product-title {
    font-family: var(--cpp-font-display);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 500;
    line-height: 1.2;
    color: var(--cpp-text);
    margin-bottom: 16px;
    letter-spacing: -.01em;
}

/* Price */
.cpp-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.cpp-price-label {
    font-size: .85rem;
    color: var(--cpp-text-muted);
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.cpp-price-original {
    font-size: 1.15rem;
    color: var(--cpp-text-muted);
    text-decoration: line-through;
}
.cpp-price-sale {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--cpp-sale);
    font-family: var(--cpp-font-display);
}

/* Description */
.cpp-product-description {
    font-size: .93rem;
    color: #374151;
    line-height: 1.75;
    margin-bottom: 24px;
    border-top: 1px solid var(--cpp-border);
    padding-top: 18px;
}
.cpp-product-description p { margin-bottom: 10px; }
.cpp-product-description p:last-child { margin-bottom: 0; }

/* ── Actions ── */
.cpp-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.cpp-qty {
    width: 68px;
    height: 46px;
    border: 1.5px solid var(--cpp-border);
    border-radius: 6px;
    padding: 0 10px;
    font-size: .95rem;
    font-family: var(--cpp-font-body);
    color: var(--cpp-text);
    text-align: center;
    transition: border-color .2s;
}
.cpp-qty:focus { outline: none; border-color: var(--cpp-primary); }

/* WhatsApp Contact Button */
.cpp-btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cpp-primary);
    color: var(--cpp-white) !important;
    border: none;
    border-radius: 6px;
    padding: 0 24px;
    height: 46px;
    font-size: .9rem;
    font-weight: 600;
    font-family: var(--cpp-font-body);
    letter-spacing: .03em;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .2s, transform .15s, box-shadow .2s;
    white-space: nowrap;
}
.cpp-btn-contact:hover {
    background: var(--cpp-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(90,122,106,.35);
    color: var(--cpp-white) !important;
}
.cpp-btn-contact:active { transform: translateY(0); }
.cpp-btn-contact svg { flex-shrink: 0; }

/* Small variant (related cards) */
.cpp-btn-sm {
    height: 36px;
    padding: 0 14px;
    font-size: .78rem;
    border-radius: 5px;
    gap: 5px;
}

/* Wishlist / Share */
.cpp-btn-wishlist,
.cpp-btn-share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1.5px solid var(--cpp-border);
    border-radius: 6px;
    padding: 0 14px;
    height: 46px;
    font-size: .78rem;
    font-weight: 600;
    font-family: var(--cpp-font-body);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--cpp-text-muted);
    cursor: pointer;
    transition: all .2s;
}
.cpp-btn-wishlist:hover,
.cpp-btn-share:hover {
    border-color: var(--cpp-primary);
    color: var(--cpp-primary);
    background: var(--cpp-primary-light);
}

/* ── Meta ── */
.cpp-meta {
    border-top: 1px solid var(--cpp-border);
    padding-top: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cpp-meta-row {
    display: flex;
    gap: 16px;
    font-size: .85rem;
}
.cpp-meta-row > span:first-child {
    min-width: 80px;
    color: var(--cpp-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .78rem;
}
.cpp-meta-row > span:last-child { color: var(--cpp-text); }
.cpp-meta-row span span { /* tag inline */
    display: inline-block;
    background: #f1f5f9;
    border: 1px solid var(--cpp-border);
    border-radius: 4px;
    padding: 1px 7px;
    font-size: .75rem;
    margin: 1px 2px 1px 0;
}

/* ── Secure Box ── */
.cpp-secure-box {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--cpp-primary-light);
    border: 1px solid #c3d9cc;
    border-radius: var(--cpp-radius);
    padding: 14px 18px;
    font-size: .82rem;
    color: #2d4a3a;
}
.cpp-secure-icon { flex-shrink: 0; padding-top: 2px; }
.cpp-secure-box strong { display: block; font-weight: 600; margin-bottom: 2px; font-size: .86rem; }
.cpp-secure-box p { margin: 0; line-height: 1.5; }

/* ══════════════════════════════════════════
   TABS SECTION
══════════════════════════════════════════ */
.cpp-tabs-section {
    background: var(--cpp-white);
    border-top: 1px solid var(--cpp-border);
    padding: 0 0 48px;
}

.cpp-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--cpp-border);
    margin-bottom: 28px;
    overflow-x: auto;
    scrollbar-width: none;
}
.cpp-tabs::-webkit-scrollbar { display: none; }

.cpp-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 14px 22px;
    font-family: var(--cpp-font-body);
    font-size: .88rem;
    font-weight: 500;
    color: var(--cpp-text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s, border-color .2s;
    letter-spacing: .02em;
}
.cpp-tab:hover { color: var(--cpp-primary); }
.cpp-tab.active {
    color: var(--cpp-text);
    border-bottom-color: var(--cpp-primary);
    font-weight: 600;
}

.cpp-tab-content { display: none; }
.cpp-tab-content.active { display: block; }

.cpp-tab-content h3 {
    font-family: var(--cpp-font-display);
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--cpp-text);
}
.cpp-tab-content p,
.cpp-tab-content div {
    font-size: .9rem;
    color: #374151;
    line-height: 1.75;
    margin-bottom: 12px;
}
.cpp-tab-content p:last-child { margin-bottom: 0; }
.cpp-tab-content strong { font-weight: 600; color: var(--cpp-text); }
.cpp-tab-content a { color: var(--cpp-primary); text-decoration: underline; }
.cpp-tab-content hr {
    border: none;
    border-top: 1px solid var(--cpp-border);
    margin: 20px 0;
}

/* ══════════════════════════════════════════
   RELATED PRODUCTS
══════════════════════════════════════════ */
.cpp-related-section {
    background: var(--cpp-bg);
    border-top: 1px solid var(--cpp-border);
    padding: 56px 0;
}

.cpp-related-title {
    font-family: var(--cpp-font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 500;
    color: var(--cpp-text);
    margin-bottom: 32px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--cpp-border);
}

.cpp-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.cpp-related-card {
    background: var(--cpp-white);
    border: 1px solid var(--cpp-border);
    border-radius: var(--cpp-radius);
    overflow: hidden;
    position: relative;
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}
.cpp-related-card:hover {
    box-shadow: var(--cpp-shadow);
    transform: translateY(-3px);
}
.cpp-related-card > a:first-of-type {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f6f4;
}
.cpp-related-card > a:first-of-type img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.cpp-related-card:hover > a:first-of-type img { transform: scale(1.06); }

.cpp-sale-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--cpp-sale);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    padding: 3px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    z-index: 5;
}

.cpp-related-card h4 {
    font-family: var(--cpp-font-display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--cpp-text);
    margin: 12px 14px 4px;
    line-height: 1.3;
}
.cpp-related-card h4 a {
    color: inherit;
    text-decoration: none;
}
.cpp-related-card h4 a:hover { color: var(--cpp-primary); }

.cpp-related-price {
    font-size: .88rem;
    color: var(--cpp-text-muted);
    margin: 0 14px 12px !important;
}
.cpp-related-price del { margin-right: 4px; }
.cpp-related-price span { color: var(--cpp-sale); font-weight: 600; }

.cpp-related-card .cpp-btn-contact {
    margin: auto 14px 14px;
    justify-content: center;
    width: calc(100% - 28px);
}

/* ══════════════════════════════════════════
   BADGES / FOOTER TRUST STRIP
══════════════════════════════════════════ */
.cpp-badges-section {
    background: var(--cpp-white);
    border-top: 1px solid var(--cpp-border);
    padding: 40px 0;
}

.cpp-badges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
@media (max-width: 720px) {
    .cpp-badges-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
    .cpp-badges-grid { grid-template-columns: 1fr; }
}

.cpp-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 4px 0;
}
.cpp-badge svg { color: #9ca3af; margin-bottom: 2px; }
.cpp-badge strong {
    font-size: .88rem;
    font-weight: 600;
    color: var(--cpp-text);
    display: block;
}
.cpp-badge p {
    font-size: .78rem;
    color: var(--cpp-text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ══════════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════════ */
.cpp-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.85);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}
.cpp-lightbox.open { display: flex; }

.cpp-lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
#cpp-lb-img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 24px 64px rgba(0,0,0,.4);
}
.cpp-lightbox-close {
    position: absolute;
    top: -40px; right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: .8;
    transition: opacity .2s;
}
.cpp-lightbox-close:hover { opacity: 1; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 600px) {
    .cpp-product-section { padding: 28px 0 36px; }
    .cpp-actions { gap: 8px; }
    .cpp-btn-contact { padding: 0 16px; font-size: .85rem; }
    .cpp-tabs-section { padding-bottom: 32px; }
    .cpp-related-section { padding: 36px 0; }
    .cpp-badge { flex-direction: row; align-items: flex-start; gap: 12px; }
    .cpp-badge svg { flex-shrink: 0; margin-top: 2px; }
}