/**
 * GCE public ecard product page styles.
 *
 * Loaded only on the cacheable public single ecard template page.
 * The full editor stylesheet remains reserved for ?editor=1 and admin editor flows.
 */

/* ============================================
   PRODUCT PAGE LAYOUT (NEW TWO-COLUMN STYLE)
   ============================================ */

.gce-product-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gce-single-ecard-ad {
    width: 100%;
    min-height: 90px;
    margin: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}

.gce-single-ecard-ad--bottom {
    margin: 34px 0 0;
}

.gce-single-ecard-ad ins {
    max-width: 100%;
}

body.single-ecard h1.entry-title,
body.single-ecard .entry-header h1,
body.single-ecard .entry-hero h1,
body.single-ecard .product-title h1,
body.single-ecard .gce-product-title {
    color: #b8325f;
    font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.18;
}

.gce-product-layout {
    margin-bottom: 40px;
}

.gce-product-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.gce-product-left {
    position: sticky;
    top: 20px;
}

.gce-product-visual {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Fixed "stage" from hero/featured dimensions — swaps keep same frame (Amazon / Woo-style). */
.gce-product-main-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dcdcde;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    line-height: 0;
}



.gce-product-main-image-link {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
    cursor: pointer;
}

.gce-product-main-image-wrap .gce-product-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.gce-product-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid #eaeaea;
    list-style: none;
}

button.gce-product-gallery-thumb {
    box-sizing: border-box;
    margin: 0;
    padding: 3px;
    width: 76px;
    height: 76px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    line-height: 0;
    flex: 0 0 auto;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

button.gce-product-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #fafafa;
}

button.gce-product-gallery-thumb:hover,
button.gce-product-gallery-thumb:focus-visible {
    border-color: #8A4B83;
    outline: none;
}

button.gce-product-gallery-thumb.is-active {
    border-color: #8A4B83;
    box-shadow: 0 0 0 1px #8A4B83;
}

.gce-product-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gce-product-price {
    font-size: 2.5em;
    font-weight: 700;
    color: #8A4B83;
}

.gce-personalize-btn,
.gce-mobile-launch-btn {
    display: block;
    width: 100%;
    padding: 18px 40px;
    background: linear-gradient(135deg, #8A4B83 0%, #A05893 100%);
    color: #fff !important;
    text-align: center;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 1.2em;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(138, 75, 131, 0.2);
}

.gce-personalize-btn:hover,
.gce-mobile-launch-btn:hover {
    background: linear-gradient(135deg, #9A5B93 0%, #B068A3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(138, 75, 131, 0.3);
    color: #fff !important;
}

.gce-personalize-btn:active,
.gce-mobile-launch-btn:active {
    transform: translateY(0);
}

.gce-product-instructions {
    padding: 0;
    line-height: 1.6;
    margin-top: 20px;
}

.gce-product-instruction-block + .gce-product-instruction-block {
    margin-top: 18px;
}

.gce-product-instructions h2,
.gce-product-instructions h3 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-size: 1.3em;
}

.gce-product-instructions h2:first-child,
.gce-product-instructions h3:first-child {
    margin-top: 0;
}

.gce-product-description {
    padding: 0;
    line-height: 1.6;
    margin-bottom: 30px;
}

.gce-product-description h2,
.gce-product-description h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.gce-product-description h2:first-child,
.gce-product-description h3:first-child {
    margin-top: 0;
}

.gce-similar-ecards {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.gce-similar-ecards h3 {
    margin-bottom: 20px;
}

.gce-similar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.gce-similar-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    background: #fff;
}

.gce-similar-item a {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.gce-similar-thumbnail {
    width: 100%;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    line-height: 0;
}

.gce-similar-thumbnail img,
.gce-similar-thumbnail .gce-similar-thumbnail-fallback {
    width: 100%;
    height: auto;
    display: block;
}

.gce-similar-thumbnail .gce-thumb,
.gce-similar-thumbnail .gce-thumb__inner {
    width: 100%;
    height: auto;
    display: block;
}

.gce-similar-thumbnail .gce-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.gce-similar-title {
    font-size: 16px;
    margin: 10px 12px 14px;
    color: #333;
    line-height: 1.3;
}

/* Mobile launch container (deprecated) */
.gce-mobile-launch-container {
    display: none !important;
}

/* Responsive: Stack columns on mobile/tablet */
@media (max-width: 968px) {
    .gce-product-split {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .gce-product-left {
        position: static;
    }
    
    .gce-product-price {
        font-size: 2em;
    }
    
    .gce-personalize-btn,
    .gce-mobile-launch-btn {
        font-size: 1.1em;
        padding: 15px 30px;
    }

    /* Same horizontal thumb strip when stacked single-column (theme full-width buttons). */
    .gce-product-layout .gce-product-gallery-thumbs {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .gce-product-layout button.gce-product-gallery-thumb {
        width: 76px !important;
        max-width: 76px !important;
        min-width: 0 !important;
        height: 76px !important;
        flex: 0 0 76px !important;
    }
}

@media (max-width: 768px) {
    .gce-product-wrapper {
        padding: 15px;
    }
    
    .gce-product-split {
        gap: 20px;
    }
    
    .gce-product-price {
        font-size: 1.8em;
    }
    
    .gce-personalize-btn,
    .gce-mobile-launch-btn {
        font-size: 1em;
        padding: 12px 24px;
    }
    
    .gce-product-instructions,
    .gce-product-description {
        padding: 0;
    }

    .gce-similar-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gce-similar-title {
        font-size: 14px;
        margin: 8px 9px 12px;
    }
}

.gce-product-code {
    margin: -4px 0 14px;
    font-size: 13px;
    color: #6b7280;
    letter-spacing: 0.01em;
}

.gce-product-code strong {
    color: #374151;
    font-weight: 700;
}
