/* ═══════════════════════════════════════════════════════
   CERTIFICATES & PLAQUES — PRICE TAG DESIGN (BRAND COLORS)
   Gold ribbon + dark tag with proper spacing
   Doesn't overlap button, matches Five Star Awards branding
   ═══════════════════════════════════════════════════════ */

/* ── Shop header: center the heading + intro copy instead of
   left-aligned, since it reads better as an intro banner. ── */
.fsbw-shop-header .container {
    text-align: center;
}
.fsbw-shop-sub {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Shop header: gold accent on part of the heading ── */
.fsbw-title-accent {
    color: #c9a84c;
}

/* ── Shop header: two-paragraph intro copy ── */
.fsbw-shop-sub {
    margin-bottom: 8px;
}
.fsbw-shop-sub:last-of-type {
    margin-bottom: 0;
}
.fsbw-shop-sub strong {
    color: #c9a84c;
    font-weight: 700;
}

/* ── Product grid (4 items, real photography) ── */
.cp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}
.cp-card {
    position: relative; /* anchors the stretched .cp-card-link overlay */
    background: #fff;
    border: 1px solid #ece9e0;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}
.cp-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 44px rgba(201,168,76,0.16);
    border-color: rgba(201,168,76,0.4);
}

/* ── Whole-card click target ─────────────────────────────
   A single transparent link stretched over the entire card
   (the "stretched link" pattern). This is the ONLY real link
   in the card now — the image and "Select This Design" button
   are plain elements styled to look the same, so clicking
   anywhere (photo, title, price tag, button) navigates to the
   product page. z-index sits above the card's static content
   but the link itself is invisible, so nothing looks different. ── */
.cp-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    text-decoration: none;
}
.cp-card-link:focus-visible {
    outline: 2px solid #c9a84c;
    outline-offset: -2px;
    border-radius: 16px;
}

.cp-card-media {
    position: relative;
    background: #f4efe6;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    height: 320px;
    overflow: hidden;
}

.cp-card-media img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.15));
    transition: transform 0.4s ease;
}
.cp-card:hover .cp-card-media img { transform: scale(1.04); }

/* Type tag in card body */
.cp-card-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(201,168,76,0.12);
    border: 1px solid rgba(201,168,76,0.35);
    color: #b8962e;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.cp-card-type-tag i { font-size: 0.6rem; }

.cp-card-body {
    padding: 22px 24px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.cp-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}
.cp-card-desc { 
    font-size: 0.86rem; 
    color: #333; 
    line-height: 1.6; 
    margin-bottom: 14px; 
    flex: 1; 
}

/* ═══════════════════════════════════════════════════════
   PRICE TAG DESIGN (BRAND COLORS) — v3
   Real price-tag silhouette: pointed right edge + a punched
   "hole" near the tip, like a physical tag on a string.
   The discount badge sits as a block on the LEFT edge of the
   tag with normal horizontal text (wraps onto 2 short lines
   if needed) instead of rotated writing-mode text — same
   tag shape as before, just readable.
   ═══════════════════════════════════════════════════════ */

.cp-card-price-row {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 82px;
    background: linear-gradient(135deg, #2c2c3e 0%, #17140c 100%);
    /* Pointed right edge, like a tag */
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%);
    margin: 18px 0 16px 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* ── Punched hole near the tip, like string would pass through
   a real tag. Color-matches the card background it sits on. ── */
.cp-card-price-row::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 20px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

/* ── Discount badge: a solid block on the left edge of the tag.
   Text reads normally left-to-right; narrow width just wraps
   short labels ("27% OFF") onto two lines instead of rotating
   them, so it stays scannable at a glance. ── */
.cp-card-discount-badge {
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #c9a84c 0%, #e0c06a 100%);
    color: #1a1000;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    padding: 6px 5px;
}

/* ── Price content: fills the rest of the tag, with right-hand
   padding reserved so text never runs under the point/hole. ── */
.cp-price-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: 8px 34px 8px 14px;
}

/* Original / "Was" price — crossed out, muted grey (not a
   dimmed gold) so it stays legible next to the strikethrough ── */
.cp-card-price-original {
    font-size: 0.82rem;
    color: #a6a2b3;
    text-decoration: line-through;
    font-weight: 500;
}

/* Current / discounted price — large, gold. Unit is nested
   inside so it sits inline on the same baseline as the price
   instead of stacking underneath it. ── */
.cp-card-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: #e0c06a;
    line-height: 1;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.cp-card-price-unit {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.66rem;
    font-weight: 600;
    color: #c9a84c;
    letter-spacing: 0.2px;
    margin-left: 3px;
}

/* Undiscounted products (no badge) get a little extra left
   padding so the price isn't jammed against the tag's edge. */
.cp-card-price-row:not(:has(.cp-card-discount-badge)) .cp-price-content {
    padding-left: 20px;
}

/* ── Same tag reused on the product detail page: it sits in a
   wider column next to a full-size product title, so bump the
   price and badge up a size and give it some breathing room. ── */
.cp-product-price-row {
    min-height: 92px;
    margin: 18px 0 22px 0;
    max-width: 360px;
}
.cp-product-price-row .cp-card-discount-badge {
    flex-basis: 64px;
    font-size: 0.7rem;
}
.cp-product-price-row .cp-card-price {
    font-size: 2.1rem;
}
.cp-product-price-row .cp-card-price-original {
    font-size: 0.92rem;
}
.cp-product-price-row .cp-card-price-unit {
    font-size: 0.72rem;
}

/* ── Responsive: Tablets ── */
@media (max-width: 768px) {
    .cp-card-price-row {
        min-height: 74px;
        clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
    }

    .cp-card-discount-badge {
        flex-basis: 50px;
        font-size: 0.58rem;
        padding: 5px 4px;
    }

    .cp-price-content {
        padding: 6px 28px 6px 12px;
    }

    .cp-card-price-row::after {
        right: 16px;
        width: 9px;
        height: 9px;
    }

    .cp-card-price {
        font-size: 1.55rem;
    }

    .cp-card-price-original {
        font-size: 0.78rem;
    }
}

/* ── Responsive: Mobile ── */
@media (max-width: 480px) {
    .cp-card-price-row {
        min-height: 66px;
        margin: 16px 0 14px 0;
        clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%);
    }

    .cp-card-discount-badge {
        flex-basis: 42px;
        font-size: 0.5rem;
        padding: 4px 3px;
    }

    .cp-price-content {
        padding: 5px 22px 5px 10px;
        gap: 1px;
    }

    .cp-card-price-row::after {
        right: 13px;
        width: 8px;
        height: 8px;
    }

    .cp-card-price {
        font-size: 1.3rem;
    }

    .cp-card-price-original {
        font-size: 0.7rem;
    }

    .cp-card-body {
        padding: 18px 20px 16px;
    }

    .cp-card-desc {
        margin-bottom: 12px;
    }
}

/* ── Select button ──────────────────────────────────────
   No longer an <a> — it's a styled <span> now that the whole
   card is one click target (see .cp-card-link above). The
   :hover treatment is triggered by hovering the CARD, not this
   element directly, since it sits underneath the stretched
   overlay link and would never receive its own :hover state. ── */
.btn-cp-select {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1a1a2e;
    color: #fff;
    font-weight: 700;
    font-size: 0.86rem;
    padding: 13px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
    border: 2px solid transparent;
}
.cp-card:hover .btn-cp-select {
    background: #c9a84c;
    color: #1a1000;
    transform: translateY(-2px);
}

/* ── Intro strip ── */
.cp-intro-note {
    background: #fff8ec;
    border: 1px solid rgba(201,168,76,0.25);
    border-radius: 12px;
    padding: 18px 24px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 34px;
}
.cp-intro-note i { 
    color: #c9a84c; 
    font-size: 1.2rem; 
    margin-top: 2px; 
    flex-shrink: 0; 
}
.cp-intro-note p { 
    font-size: 0.88rem; 
    color: #333; 
    margin: 0; 
    line-height: 1.6; 
}

/* ═══════════════════════════════════════════════════════
   PRODUCT DETAIL PAGE
   ═══════════════════════════════════════════════════════ */

/* ── Product detail gallery ── */
.cp-gallery-main {
    position: relative;
    width: 100%;
    background: #f4efe6;
    border-radius: 16px;
    border: 1px solid rgba(201,168,76,0.2);
    overflow: hidden;
    cursor: zoom-in;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}
.cp-gallery-main.orientation-portrait { aspect-ratio: 3 / 4; }
.cp-gallery-main.orientation-landscape { aspect-ratio: 4 / 3; }
.cp-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 1;
    transition: transform 0.15s ease-out, opacity 0.4s ease;
    transform-origin: center center;
    pointer-events: none;
    filter: drop-shadow(0 10px 26px rgba(0,0,0,0.2));
}
.cp-gallery-main.zoomed img { transform: scale(2.1); }

/* ── Smooth crossfade between slides ── */
.cp-gallery-main img.cp-fade-out {
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* ── Disable hover-zoom on small devices ── */
@media (max-width: 991.98px) {
    .cp-gallery-main {
        cursor: default;
    }
    .cp-gallery-main.zoomed img {
        transform: none;
    }
    .cp-gallery-hint {
        display: none;
    }
}

.cp-gallery-hint {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(0,0,0,0.55);
    color: rgba(255,255,255,0.85);
    font-size: 0.7rem;
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

/* ── Gallery navigation ── */
.cp-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(26,26,46,0.55);
    color: #fff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s ease;
}
.cp-gallery-nav:hover { background: #c9a84c; }
.cp-gallery-prev { left: 14px; }
.cp-gallery-next { right: 14px; }

.cp-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}
.cp-gallery-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ddd6c4;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
    overflow: hidden;
}
.cp-gallery-dot.active { background: #c9a84c; }

/* ── Active dot progress bar animation ── */
.cp-gallery-dot.active::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #1a1a2e;
    transform-origin: left center;
    transform: scaleX(0);
}
.cp-gallery-dot.active.cp-dot-animating::after {
    animation: cpDotFill 4.5s linear forwards;
    animation-play-state: running;
}
@keyframes cpDotFill {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* ── Personalization field ── */
.cp-personalize-box {
    background: #f7f5f0;
    border: 1.5px dashed rgba(201,168,76,0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 22px;
}
.cp-personalize-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cp-personalize-label i { color: #c9a84c; }
.cp-personalize-hint { 
    font-size: 0.78rem; 
    color: #333; 
    margin-bottom: 12px; 
    line-height: 1.5; 
}

@media (max-width: 480px) {
    .cp-personalize-box .checkout-input-wrap input#printName {
        font-size: 0.82rem;
    }
    .cp-personalize-box .checkout-input-wrap input#printName::placeholder {
        font-size: 0.8rem;
    }
}

/* ── Inline error state ── */
.checkout-input-wrap:has(.cp-input-error) {
    border-color: #dc3545;
}
.cp-input-error {
    border-color: #dc3545 !important;
    animation: cpInputShake 0.35s ease;
}
@keyframes cpInputShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ═══════════════════════════════════════════════════════
   CART & CHECKOUT
   ═══════════════════════════════════════════════════════ */

/* ── Cart line with thumbnail ── */
.cp-cart-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: #f4efe6;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cp-cart-thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}
.cp-cart-printname {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #c9a84c;
    font-weight: 600;
    margin-top: 4px;
}
.cp-cart-printname i { font-size: 0.72rem; }

@media (max-width: 991.98px) {
    .fsbw-cart-link {
        align-items: center;
        gap: 6px;
    }
}

@media (max-width: 576px) {
    .cp-gallery-main { padding: 18px; }
}