/**
 * Global Addon for WooCommerce - Frontend Styles
 *
 * Main stylesheet for frontend addon display
 *
 * @package GlobalAddon
 * @version 1.0.0
 */

/* CSS Variables - Can be overridden by theme */
:root {
    /* Primary Colors */
    --wgpao-primary-blue: #3366ff;
    --wgpao-blue-500: #2563eb;
    --wgpao-blue-600: #1d4ed8;
    --wgpao-blue-700: #1e40af;

    /* Background Colors */
    --wgpao-bg-primary: #ffffff;
    --wgpao-bg-secondary: #f8f9fa;
    --wgpao-bg-light: #F9FAFB;
    --wgpao-bg-hover: #ebf2ff;
    --wgpao-bg-selected: #e9ecef;

    /* Text Colors */
    --wgpao-text-primary: #000000;
    --wgpao-text-secondary: #1a1a1a;
    --wgpao-text-dark: #111827;
    --wgpao-text-medium: #2c3e50;
    --wgpao-text-muted: #6b7280;
    --wgpao-text-light: #9ca3af;

    /* Border Colors */
    --wgpao-border-light: #e0e0e0;
    --wgpao-border-medium: #e5e7eb;
    --wgpao-border-grey: #D1D5DB;
    --wgpao-border-muted: #e9ecef;

    /* Status Colors */
    --wgpao-success: #10b981;
    --wgpao-success-dark: #059669;
    --wgpao-info: #007bff;
    --wgpao-warning: #f59e0b;
    --wgpao-warning-dark: #d97706;
    --wgpao-error: #ef4444;

    /* Border Radius */
    --wgpao-radius-sm: 4px;
    --wgpao-radius-md: 6px;
    --wgpao-radius-lg: 8px;
    --wgpao-radius-xl: 12px;
    --wgpao-radius-2xl: 16px;
    --wgpao-radius-3xl: 20px;
    --wgpao-radius-full: 50%;
    --wgpao-spacing-sm: 0.5rem;
    --wgpao-spacing-md: 1rem;
    --wgpao-spacing-lg: 1.5rem;
    --wgpao-spacing-xl: 2rem;

    /* Transitions */
    --wgpao-transition: 0.2s ease;

    /* Tooltip stacking — raise above sticky headers; override with a lower value if needed */
    --wgpao-tooltip-z-index: 99999;
}

/* Section Title */
.wgpao-section-title {
    margin: var(--wgpao-spacing-md) 0;
    clear: both;
    contain: inline-size;
}

.wgpao-section-title h2 {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--wgpao-text-dark);
    margin: 0 0 var(--wgpao-spacing-sm) 0;
    padding: 0;
    line-height: 1.4;
}

/* Main Container */
.wgpao-addons-container {
    margin: var(--wgpao-spacing-lg) 0;
    clear: both;
    /* Clip any absolutely-positioned child (e.g. tooltip bubbles near an edge)
       so plugin content can never force the page into horizontal scroll. */
    overflow-x: clip;
    /* Prevent content from contributing to parent grid/flex min-content sizing.
       Without this, the WooCommerce add-to-cart block's `grid-template-columns:
       min-content auto auto` inflates its tracks to fit our addon content,
       causing horizontal scroll on narrow viewports. */
    contain: inline-size;
}

.wgpao-section-title + .wgpao-addons-container {
    margin-top: var(--wgpao-spacing-sm);
}

.wgpao-addons-container * {
    box-sizing: border-box;
}

/* Loading State */
.wgpao-loading {
    text-align: center;
    padding: var(--wgpao-spacing-lg);
    color: var(--wgpao-text-muted);
}

/* ===== CART & CHECKOUT STYLES ===== */

/* Cart addon items */
.wgpao-cart-addons {
    font-size: 0.9em;
    margin-top: 0.5em;
    color: #666;
}

.wgpao-cart-addon-item {
    margin-left: 1em;
    line-height: 1.6;
}

.wgpao-cart-addon-item span:first-child {
    color: #999;
}

.wgpao-cart-addon-item span:last-child {
    color: var(--wgpao-text-muted);
}

/* Checkout addon display */
.wgpao-checkout-addons {
    font-size: 0.85em;
    color: #666;
    margin-top: 0.25em;
}

.wgpao-checkout-addons > div {
    margin-left: 0.5em;
}

/* Order addon display */
.wgpao-order-addons {
    font-size: 0.9em;
    margin-top: 0.5em;
    color: #666;
}

.wgpao-order-addons > div {
    margin-left: 1em;
}

.wgpao-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--wgpao-border-light);
    border-top-color: var(--wgpao-primary-blue);
    border-radius: 50%;
    animation: wgpao-spin 0.8s linear infinite;
}

@keyframes wgpao-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error State */
.wgpao-error {
    padding: var(--wgpao-spacing-md);
    background-color: #fee2e2;
    border: 1px solid var(--wgpao-error);
    border-radius: var(--wgpao-radius-md);
    color: #991b1b;
    margin: var(--wgpao-spacing-md) 0;
}

/* Notice/Message */
.wgpao-notice {
    padding: var(--wgpao-spacing-md);
    margin: var(--wgpao-spacing-md) 0;
    border-radius: var(--wgpao-radius-md);
    border-left: 4px solid;
}

.wgpao-notice.success {
    background-color: #d1fae5;
    border-color: var(--wgpao-success);
    color: #065f46;
}

.wgpao-notice.info {
    background-color: #dbeafe;
    border-color: var(--wgpao-info);
    color: #1e40af;
}

.wgpao-notice.warning {
    background-color: #fef3c7;
    border-color: var(--wgpao-warning);
    color: #92400e;
}

/* Accessibility */
.wgpao-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .wgpao-addons-container {
        margin: var(--wgpao-spacing-md) 0;
    }
}

/* Print Styles */
@media print {
    .wgpao-addons-container {
        display: none;
    }
}

/* ===== DYNAMIC PRICE UPDATE STYLES ===== */

/* Updated price display */
.wgpao-updated-price {
    display: inline-block;
    transition: color 0.3s ease, transform 0.2s ease;
}

/* Price change animation */
.wgpao-updated-price.wgpao-price-changed {
    animation: wgpao-price-flash 0.5s ease;
}

@keyframes wgpao-price-flash {
    0% {
        color: inherit;
        transform: scale(1);
    }
    50% {
        color: var(--wgpao-success, #10b981);
        transform: scale(1.05);
    }
    100% {
        color: inherit;
        transform: scale(1);
    }
}

/* ===================================================================
   TEMPLATE STYLES - Choice Pills
   =================================================================== */

.wgpao-pill-variations-container {
    padding: 1.5rem;
    margin: 1.5rem 0 2rem 0;
    background-color: var(--wgpao-bg-light, #F9FAFB);
    border-radius: var(--wgpao-radius-lg, 8px);
    box-sizing: border-box;
}

.wgpao-variation-group {
    margin-bottom: 2rem;
}

.wgpao-variation-group:last-child {
    margin-bottom: 0;
}

.wgpao-variation-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--wgpao-text-dark, #111827);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wgpao-tooltip-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--wgpao-theme-primary);
    color: white;
    font-size: 10px;
    font-weight: bold;
    cursor: help;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Inline addon tooltip text for list-style templates (Simple List, Option Cards, Modern List).
   These templates render the tooltip as visible body copy instead of a ? hover bubble. */
.wgpao-addon-tooltip-text {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #555;
}

.wgpao-tooltip-trigger:hover {
    background-color: var(--wgpao-theme-primary);
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Tooltip bubble.
   Position is applied via JS (see bindTooltips in frontend.js) which portals
   the bubble to <body> on open and computes a viewport-aware placement. The
   static rules here only cover appearance and the hidden-state defaults. */
.wgpao-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    padding: 8px 12px;
    background-color: var(--wgpao-theme-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    text-align: left;
    border-radius: 6px;
    width: max-content;
    max-width: min(280px, calc(100vw - 16px));
    min-width: 0;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    z-index: var(--wgpao-tooltip-z-index);
    pointer-events: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18), 0 2px 4px rgba(0, 0, 0, 0.12);
}

/* Arrow. `left` is driven by --wgpao-tooltip-arrow-left (set inline by JS)
   so the arrow keeps pointing at the trigger even when the bubble is clamped
   against the viewport edge. Default state: bubble ABOVE trigger, arrow DOWN. */
.wgpao-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: var(--wgpao-tooltip-arrow-left, 50%);
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-top-color: var(--wgpao-theme-primary);
    transform: translateX(-50%);
}

/* Flipped state: bubble is BELOW the trigger, so the arrow points UP. */
.wgpao-tooltip.wgpao-tooltip-below::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: var(--wgpao-theme-primary);
}

/* Visible state — toggled by JS (bindTooltips) via the .wgpao-tooltip-open
   class on the trigger, AND (once portaled) the .wgpao-tooltip-visible class
   on the bubble itself since the bubble is no longer a descendant. */
.wgpao-tooltip-trigger.wgpao-tooltip-open > .wgpao-tooltip,
.wgpao-tooltip.wgpao-tooltip-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wgpao-pill-variation-options {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0;
}

.wgpao-pill-variation-option {
    position: relative;
    word-break: keep-all;
}

.wgpao-pill-variation-option input[type="radio"],
.wgpao-pill-variation-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wgpao-pill-variation-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 0.25rem;
    width: 100%;
    min-height: 44px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--wgpao-border-light, #e0e0e0);
    border-radius: var(--wgpao-theme-radius);
    background-color: var(--wgpao-bg-primary, #ffffff);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--wgpao-text-primary, #000000);
    box-sizing: border-box;
}

.wgpao-pill-variation-option label:hover {
    border-color: var(--wgpao-theme-primary);
    background-color: var(--wgpao-theme-primary-a10);
}

.wgpao-pill-variation-option input:checked ~ label {
    border-color: var(--wgpao-theme-primary);
    background-color: var(--wgpao-theme-primary-a10);
    color: var(--wgpao-text-primary, #000000);
}

/* Choice Pills with images: image sits above the text inside each pill. */
.wgpao-pill-variation-options.wgpao-with-images .wgpao-pill-variation-option label {
    flex-direction: column;
    padding: 0.75rem 0.75rem 0.5rem;
    gap: 0.5rem;
    min-height: auto;
}

.wgpao-pill-option-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.wgpao-pill-option-image img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    display: block;
}

/* Per-option tooltip trigger: a small `?` icon in the top-right corner of the pill.
   Uses the shared .wgpao-tooltip-trigger/.wgpao-tooltip styles for the bubble. */
.wgpao-pill-variation-tooltip {
    position: absolute;
    top: -6px;
    right: -6px;
    z-index: 2;
}
.wgpao-pill-variation-tooltip.wgpao-tooltip-trigger:focus-visible {
    outline: 2px solid var(--wgpao-theme-primary);
    outline-offset: 2px;
}

.wgpao-pill-option-value {
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.9375rem;
}

.wgpao-pill-option-price {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--wgpao-theme-price);
}

.wgpao-pill-option-price.free {
    background-color: var(--wgpao-theme-free-bg);
    color: var(--wgpao-theme-free-text);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wgpao-pill-option-discount {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.wgpao-pill-option-original-price {
    text-decoration: line-through;
    color: var(--wgpao-text-muted, #6b7280);
    font-size: 0.8125rem;
}

.wgpao-pill-option-discounted-price {
    color: var(--wgpao-theme-price);
    font-weight: 600;
}

.wgpao-addon-description {
    font-size: 0.875rem;
    color: var(--wgpao-text-muted, #6b7280);
    margin-top: 0.25rem;
    line-height: 1.4;
}

.wgpao-addon-stock-status {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 0.5rem;
}

.wgpao-addon-stock-status.in-stock {
    background-color: #d1fae5;
    color: #065f46;
}

.wgpao-addon-stock-status.out-of-stock {
    background-color: #fee2e2;
    color: #991b1b;
}

@media (max-width: 768px) {
    .wgpao-pill-variations-container {
        padding: 1rem;
        margin: 1rem 0;
    }

    .wgpao-pill-variation-options {
        gap: 0.5rem;
    }

    .wgpao-pill-variation-option label {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .wgpao-pill-variation-options {
        gap: 0.5rem;
    }

    .wgpao-pill-variation-option label {
        padding: 0 8px;
        font-size: 0.8rem;
    }
}

/* ===================================================================
   TEMPLATE STYLES - Simple List Options
   =================================================================== */

.wgpao-list-container {
    margin: 1.5rem 0 2rem 0;
    box-sizing: border-box;
}

.plus-sign {
    color: var(--wgpao-theme-price);
    font-size: 0.85rem;
    white-space: nowrap;
}

.wgpao-list-variations-container {
    margin-bottom: 2rem;
}

.wgpao-list-variations-container:last-child {
    margin-bottom: 0;
}

.wgpao-list-variation-section {
    margin-bottom: 2rem;
}

.wgpao-list-variation-section:last-child {
    margin-bottom: 0;
}

.wgpao-list-product-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wgpao-list-product-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--wgpao-border-light, #e0e0e0);
    border-radius: var(--wgpao-theme-radius);
    background: var(--wgpao-bg-primary, #ffffff);
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.wgpao-list-product-card:hover {
    border-color: var(--wgpao-theme-primary);
    box-shadow: 0 2px 8px var(--wgpao-theme-primary-a20);
}

.wgpao-list-product-card.wgpao-selected {
    border-color: var(--wgpao-theme-primary);
    background-color: var(--wgpao-theme-primary-a05);
}

.wgpao-list-product-card input[type="radio"],
.wgpao-list-product-card input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--wgpao-theme-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.wgpao-list-product-image {
    width: 80px;
    height: 80px;
    border-radius: var(--wgpao-theme-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--wgpao-text-grey, #6c757d);
    flex-shrink: 0;
    overflow: hidden;
}

.wgpao-list-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--wgpao-theme-radius);
}

.wgpao-list-product-details {
    flex: 1;
}

.wgpao-list-product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--wgpao-text-very-dark, #212529);
    margin-bottom: 0.25rem;
}

.wgpao-list-product-price-card {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wgpao-theme-price);
    margin-bottom: 0.25rem;
}

.wgpao-list-product-price-card.free {
    background-color: var(--wgpao-theme-free-bg);
    color: var(--wgpao-theme-free-text);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.wgpao-list-product-description {
    font-size: 0.875rem;
    color: var(--wgpao-text-grey, #6c757d);
    line-height: 1.4;
}

.wgpao-list-product-discount {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.wgpao-list-product-original-price {
    color: var(--wgpao-text-light, #9ca3af);
    font-size: 0.85rem;
    white-space: nowrap;
}

.wgpao-list-product-original-price .price-text {
    text-decoration: line-through;
}

.wgpao-list-product-discounted-price {
    color: var(--wgpao-theme-price);
    font-weight: 600;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .wgpao-list-container {
        margin: 1rem 0;
    }

    .wgpao-list-product-card {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .wgpao-list-product-image {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }

    .wgpao-list-product-name {
        font-size: 0.9375rem;
    }

    .wgpao-list-product-description {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .wgpao-list-product-card {
        flex-wrap: wrap;
    }

    .wgpao-list-product-image {
        width: 50px;
        height: 50px;
    }
}

.wgpao-list-product-card input[type="radio"],
.wgpao-list-product-card input[type="checkbox"] {
    outline: none;
    box-shadow: none;
    border: none;
}

/* ===================================================================
   TEMPLATE STYLES - Color Swatches
   =================================================================== */

.wgpao-color-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--wgpao-bg-primary, #ffffff);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.wgpao-color-variations-container {
    margin-bottom: 2rem;
}

.wgpao-color-variations-container:last-child {
    margin-bottom: 0;
}

.wgpao-color-variation-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--wgpao-text-secondary, #1a1a1a);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wgpao-color-variation-options {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.wgpao-color-variation-option {
    position: relative;
    flex: 0 0 auto;
    width: 80px;
}

.wgpao-color-variation-option input[type="radio"],
.wgpao-color-variation-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wgpao-color-variation-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: var(--wgpao-theme-swatch-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 3px solid transparent;
    position: relative;
    margin: 0 auto;
}

.wgpao-color-variation-option label:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.wgpao-color-variation-option input[type="radio"]:checked + label,
.wgpao-color-variation-option input[type="checkbox"]:checked + label {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px var(--wgpao-theme-primary-a30);
}

.wgpao-color-variation-option input:disabled + label {
    opacity: 0.5;
    cursor: not-allowed;
}

.wgpao-color-variation-option input:disabled + label:hover {
    transform: none;
    box-shadow: none;
}

.wgpao-color-name {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.75rem;
    color: var(--wgpao-text-muted, #6b7280);
    text-align: center;
    pointer-events: none;
}

.wgpao-color-variation-option input:checked + label .wgpao-color-name {
    color: var(--wgpao-text-dark, #111827);
    font-weight: 600;
}

.wgpao-color-price-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--wgpao-theme-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wgpao-color-price-badge.free {
    background: var(--wgpao-theme-free-bg);
    color: var(--wgpao-theme-free-text);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: none;
}

.wgpao-color-checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wgpao-color-variation-option input:checked + label .wgpao-color-checkmark {
    opacity: 1;
}

.wgpao-color-stock-status {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 0.5rem;
}

.wgpao-color-stock-status.in-stock {
    background-color: #d1fae5;
    color: #065f46;
}

.wgpao-color-stock-status.out-of-stock {
    background-color: #fee2e2;
    color: #991b1b;
}

@media (max-width: 768px) {
    .wgpao-color-container {
        padding: 1rem;
        margin: 1rem 0;
    }

    .wgpao-color-variation-options {
        gap: 0.5rem;
    }

    .wgpao-color-variation-option {
        width: 70px;
    }

    .wgpao-color-variation-option label {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .wgpao-color-variation-option {
        width: 60px;
    }

    .wgpao-color-variation-option label {
        width: 45px;
        height: 45px;
    }
}

/* ===================================================================
   TEMPLATE STYLES - Modern List Options
   =================================================================== */

.wgpao-modern-container {
    margin: 1.5rem 0 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-sizing: border-box;
}

.wgpao-modern-variations-container {
    margin-bottom: 1.5rem;
}

.wgpao-modern-variations-container:last-child {
    margin-bottom: 0;
}

.wgpao-modern-product-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wgpao-modern-product-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--wgpao-bg-primary, #ffffff);
    border-radius: var(--wgpao-theme-radius);
    border: 1px solid rgba(199,207,241,.5);
    width: 100%;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.wgpao-modern-product-card:hover {
    background-color: var(--wgpao-theme-primary-a10);
    border-color: var(--wgpao-theme-primary);
}

.wgpao-modern-product-card.wgpao-selected {
    background-color: var(--wgpao-theme-primary-a10);
    border-color: var(--wgpao-theme-primary);
}

.wgpao-modern-product-card input[type="radio"],
.wgpao-modern-product-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wgpao-modern-product-image-container {
    flex-shrink: 0;
}

.wgpao-modern-product-image {
    width: 140px;
    height: 100px;
    border-radius: var(--wgpao-theme-modern-image-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wgpao-modern-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wgpao-modern-product-content {
    flex: 1;
}

.wgpao-modern-product-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wgpao-text-primary, #000000);
    margin-bottom: 0.5rem;
}

.wgpao-modern-product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wgpao-theme-price);
    margin-bottom: 0.75rem;
}

.wgpao-modern-product-price.free {
    background-color: var(--wgpao-theme-free-bg);
    color: var(--wgpao-theme-free-text);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.wgpao-modern-product-description {
    font-size: 0.9rem;
    color: var(--wgpao-text-primary, #000000);
    line-height: 1.4;
    margin-bottom: 1rem;
}

.wgpao-modern-add-to-cart-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wgpao-modern-add-to-cart-btn.wgpao-added {
    color: var(--wgpao-success-text, #28a745);
}

.wgpao-modern-add-to-cart-btn:not(.wgpao-added) {
    color: var(--wgpao-info, #007bff);
}

.wgpao-modern-add-to-cart-btn:hover {
    opacity: 0.8;
}

.wgpao-modern-cart-icon {
    font-size: 1rem;
}

.wgpao-modern-product-discount {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wgpao-modern-product-original-price {
    color: var(--wgpao-text-light, #9ca3af);
    text-decoration: line-through;
    font-size: 1rem;
}

.wgpao-modern-product-discounted-price {
    color: var(--wgpao-theme-price);
    font-weight: 700;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .wgpao-modern-container {
        margin: 1rem 0;
    }

    .wgpao-modern-product-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.25rem;
    }

    .wgpao-modern-product-image {
        width: 160px;
        height: 120px;
    }

    .wgpao-modern-add-to-cart-btn {
        justify-content: center;
    }

    .wgpao-modern-product-title {
        font-size: 1.125rem;
    }

    .wgpao-modern-product-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .wgpao-modern-product-card {
        padding: 1rem;
    }

    .wgpao-modern-product-image {
        width: 140px;
        height: 100px;
    }

    .wgpao-modern-product-title {
        font-size: 1rem;
    }

    .wgpao-modern-product-price {
        font-size: 1rem;
    }
}

.wgpao-modern-product-card input[type="radio"],
.wgpao-modern-product-card input[type="checkbox"] {
    outline: none;
    box-shadow: none;
    border: none;
}

/* ===================================================================
   TEMPLATE STYLES - Option Cards
   =================================================================== */

.wgpao-card-container {
    margin: 1.5rem 0 2rem 0;
    box-sizing: border-box;
}

.wgpao-card-variations-container {
    margin-bottom: 2rem;
}

.wgpao-card-variations-container:last-child {
    margin-bottom: 0;
}

.wgpao-card-product-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wgpao-card-product-card {
    position: relative;
    border: 2px solid var(--wgpao-border-medium, #e5e7eb);
    border-radius: var(--wgpao-theme-card-radius);
    padding: 1.5rem;
    background: var(--wgpao-bg-primary, #ffffff);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.wgpao-card-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wgpao-card-product-card.wgpao-selected {
    border-color: var(--wgpao-theme-primary);
    background-color: var(--wgpao-theme-primary-a10);
    box-shadow: 0 8px 25px var(--wgpao-theme-primary-a20);
}

.wgpao-card-product-card input[type="radio"],
.wgpao-card-product-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wgpao-card-product-card label {
    display: block;
    width: 100%;
    cursor: pointer;
    margin: 0;
}

.wgpao-card-product-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: var(--wgpao-theme-card-image-radius);
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--wgpao-text-muted, #6b7280);
    overflow: hidden;
}

.wgpao-card-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--wgpao-theme-card-image-radius);
    transition: all 0.2s ease;
}

.wgpao-card-product-card.wgpao-selected .wgpao-card-product-image {
    background: var(--wgpao-theme-primary);
    color: white;
}

.wgpao-card-product-card.wgpao-selected .wgpao-card-product-image img {
    opacity: 0.8;
    filter: var(--wgpao-theme-card-invert);
}

.wgpao-card-product-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--wgpao-text-secondary, #1a1a1a);
    margin-bottom: 0.5rem;
}

.wgpao-card-product-price-card {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--wgpao-theme-price);
    margin-bottom: 1rem;
}

.wgpao-card-product-price-card.free {
    background-color: var(--wgpao-theme-free-bg);
    color: var(--wgpao-theme-free-text);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.wgpao-card-product-card.wgpao-selected .wgpao-card-product-price-card {
    color: var(--wgpao-theme-price);
}

.wgpao-card-product-description {
    font-size: 0.875rem;
    color: var(--wgpao-text-muted, #6b7280);
    line-height: 1.4;
}

.wgpao-card-product-card.wgpao-selected .wgpao-card-product-description {
    color: var(--wgpao-text-dark-grey, #495057);
}

.wgpao-card-selected-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--wgpao-theme-primary);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wgpao-card-product-card.wgpao-selected .wgpao-card-selected-badge {
    opacity: 1;
}

.wgpao-card-selected-badge::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.wgpao-card-free-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--wgpao-theme-free-bg);
    color: var(--wgpao-theme-free-text);
    padding: 4px 8px;
    border-radius: var(--wgpao-theme-card-badge-radius);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.wgpao-card-product-discount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.wgpao-card-product-original-price {
    color: var(--wgpao-text-light, #9ca3af);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.wgpao-card-product-original-price .price-text {
    text-decoration: line-through;
}

.wgpao-card-product-original-price .plus-sign {
    color: var(--wgpao-theme-price);
    text-decoration: none;
    font-weight: 600;
}

.wgpao-card-product-discounted-price {
    color: var(--wgpao-theme-price);
    font-weight: 600;
    font-size: 1.125rem;
}

@media (max-width: 768px) {
    .wgpao-card-container {
        margin: 1rem 0;
    }

    .wgpao-card-product-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .wgpao-card-product-card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .wgpao-card-product-name {
        font-size: 1.125rem;
    }

    .wgpao-card-product-price-card {
        font-size: 1rem;
    }
}

.wgpao-card-product-card input[type="radio"],
.wgpao-card-product-card input[type="checkbox"] {
    outline: none;
    box-shadow: none;
    border: none;
}
