/**
 * Entdeckerweine Gift Card - Product Page Styles
 * Wine theme: burgundy #8A121F, dark text #2d0007, light bg #f4f1f1
 */

/* ========================================
   Page Layout
   ======================================== */

.ew-gc-product {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1rem 4rem;
}

.ew-gc-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* ========================================
   Left Column: Product Visual
   ======================================== */

.ew-gc-visual {
    position: sticky;
    top: 2rem;
}

.ew-gc-product-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(138, 18, 31, 0.12);
}

.ew-gc-product-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Decorative card preview (when no product image) */
.ew-gc-card-preview {
    background: linear-gradient(135deg, #1a0206 0%, #4a0a10 55%, #8A121F 100%);
    border-radius: 12px;
    padding: 2.5rem;
    color: #fff;
    text-align: center;
    aspect-ratio: 16 / 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 30px rgba(138, 18, 31, 0.25);
}

.ew-gc-card-header {
    text-align: left;
}

.ew-gc-card-logo {
    width: 80px;
    height: auto;
    display: block;
}

.ew-gc-card-body {
    text-align: center;
}

.ew-gc-card-deco {
    opacity: 0.15;
    font-size: 1.5rem;
    letter-spacing: 12px;
    margin-bottom: 1rem;
}

.ew-gc-card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.ew-gc-card-amount {
    font-size: 3.5rem;
    font-weight: 900;
    color: #f5d0a9;
    line-height: 1;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ew-gc-card-validity {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   Right Column: Product Details
   ======================================== */

.ew-gc-title {
    font-size: 2rem;
    font-weight: 900;
    color: #2d0007;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.ew-gc-price {
    font-size: 2rem;
    font-weight: 800;
    color: #8A121F;
    margin-bottom: 1rem;
}

.ew-gc-price del {
    color: #aaa;
    font-weight: 400;
}

.ew-gc-price ins {
    text-decoration: none;
}

.ew-gc-description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.ew-gc-description p {
    margin: 0 0 0.5rem;
}

.ew-gc-validity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f4f1f1;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.ew-gc-validity-icon {
    font-size: 1rem;
}

/* ========================================
   Form Sections
   ======================================== */

.ew-gc-form {
    display: flex;
    flex-direction: column;
}

.ew-gc-section {
    margin-bottom: 1.5rem;
}

.ew-gc-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2d0007;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f4f1f1;
}

/* ========================================
   Delivery Method Toggle
   ======================================== */

.ew-gc-delivery-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.ew-gc-delivery-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    background: #fff;
    position: relative;
}

.ew-gc-delivery-option:hover {
    border-color: #c4747d;
}

.ew-gc-delivery-option.ew-gc-delivery-active {
    border-color: #8A121F;
    background: #f9eaeb;
    box-shadow: 0 0 0 1px #8A121F;
}

.ew-gc-delivery-option input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ew-gc-delivery-option input[type="radio"]:focus-visible + .ew-gc-delivery-icon,
.ew-gc-delivery-option:focus-within {
    outline: 2px solid #8A121F;
    outline-offset: 2px;
    border-radius: 12px;
}

.ew-gc-delivery-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.ew-gc-delivery-label {
    font-weight: 700;
    color: #2d0007;
    font-size: 0.9rem;
    line-height: 1.3;
}

.ew-gc-delivery-desc {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.3rem;
    line-height: 1.4;
}

/* ========================================
   Recipient Fields (Collapsible)
   ======================================== */

.ew-gc-recipient-fields {
    max-height: 700px;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    opacity: 1;
    margin-bottom: 0.5rem;
}

.ew-gc-recipient-fields.ew-gc-hidden {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    pointer-events: none;
}

/* ========================================
   Form Fields
   ======================================== */

.ew-gc-field {
    margin-bottom: 1rem;
}

.ew-gc-field label {
    display: block;
    font-weight: 600;
    color: #2d0007;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.ew-gc-field label abbr.required {
    color: #8A121F;
    text-decoration: none;
    font-weight: 700;
}

.ew-gc-optional {
    font-weight: 400;
    color: #aaa;
    font-size: 0.85rem;
}

.ew-gc-input,
.ew-gc-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
    color: #333;
}

.ew-gc-input:focus,
.ew-gc-textarea:focus {
    border-color: #8A121F;
    outline: none;
    box-shadow: 0 0 0 3px rgba(138, 18, 31, 0.1);
}

.ew-gc-input::placeholder,
.ew-gc-textarea::placeholder {
    color: #bbb;
}

.ew-gc-textarea {
    resize: vertical;
    min-height: 80px;
}

.ew-gc-char-count {
    text-align: right;
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 0.25rem;
}

/* ========================================
   Add to Cart Section
   ======================================== */

.ew-gc-add-to-cart {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f4f1f1;
}

.ew-gc-add-to-cart .quantity {
    flex-shrink: 0;
}

.ew-gc-add-to-cart .quantity .qty {
    width: 70px;
    padding: 0.75rem 0.5rem;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    font-family: inherit;
}

.ew-gc-add-to-cart .quantity .qty:focus {
    border-color: #8A121F;
    outline: none;
    box-shadow: 0 0 0 3px rgba(138, 18, 31, 0.1);
}

.ew-gc-button {
    background: #8A121F !important;
    color: #fff !important;
    border: none !important;
    padding: 0.9rem 2.5rem !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    flex-grow: 1;
    text-align: center;
    letter-spacing: 0.02em;
}

.ew-gc-button:hover {
    background: #6d0e18 !important;
}

.ew-gc-button:focus-visible {
    background: #6d0e18 !important;
    outline: 2px solid #8A121F;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(138, 18, 31, 0.2);
}

.ew-gc-button:disabled {
    background: #888 !important;
    color: #e0e0e0 !important;
    cursor: not-allowed !important;
}

/* Unavailable message */
.ew-gc-unavailable {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

/* ========================================
   Error States
   ======================================== */

.ew-gc-field-error {
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1) !important;
}

.ew-gc-form-errors {
    margin-bottom: 1rem;
}

.ew-gc-error-notice {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #d32f2f;
    color: #721c24;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========================================
   WooCommerce Notices Override
   ======================================== */

.ew-gc-product .woocommerce-error,
.ew-gc-product .woocommerce-message,
.ew-gc-product .woocommerce-info {
    margin-bottom: 1rem;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 992px) {
    .ew-gc-page {
        gap: 2rem;
    }

    .ew-gc-card-amount {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .ew-gc-page {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .ew-gc-visual {
        position: static;
    }

    .ew-gc-card-preview {
        aspect-ratio: 16 / 9;
        padding: 2rem;
    }

    .ew-gc-card-amount {
        font-size: 2.5rem;
    }

    .ew-gc-title {
        font-size: 1.6rem;
    }

    .ew-gc-price {
        font-size: 1.6rem;
    }

    .ew-gc-delivery-toggle {
        grid-template-columns: 1fr;
    }

    .ew-gc-add-to-cart {
        flex-direction: column;
        align-items: stretch;
    }

    .ew-gc-add-to-cart .quantity {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ew-gc-product {
        padding: 1rem 0.5rem;
    }

    .ew-gc-card-preview {
        padding: 1.5rem;
    }

    .ew-gc-card-amount {
        font-size: 2rem;
    }

    .ew-gc-delivery-option {
        padding: 1rem;
    }
}

/* ========================================
   GIFT CARDS CATALOG PAGE
   ======================================== */

.ew-gc-catalog {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1rem 4rem;
}

/* Hero Section */
.ew-gc-catalog-hero {
    background: linear-gradient(135deg, #1a0206 0%, #4a0a10 55%, #8A121F 100%);
    color: #fff;
    padding: 3.5rem 2rem 3rem;
    text-align: center;
    border-radius: 16px;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.ew-gc-catalog-hero-content {
    position: relative;
    z-index: 1;
}

.ew-gc-catalog-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.ew-gc-catalog-subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    margin: 0;
    font-weight: 400;
}

.ew-gc-catalog-hero-deco {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none;
}

.ew-gc-catalog-hero-deco span {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.ew-gc-catalog-hero-deco span:nth-child(1) {
    width: 150px;
    height: 150px;
    top: -40px;
    right: 5%;
}

.ew-gc-catalog-hero-deco span:nth-child(2) {
    width: 80px;
    height: 80px;
    bottom: -20px;
    left: 15%;
}

.ew-gc-catalog-hero-deco span:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 30%;
    left: 5%;
}

/* Cards Grid */
.ew-gc-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.ew-gc-catalog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ew-gc-catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(138, 18, 31, 0.15);
}

/* Card Visual */
.ew-gc-catalog-card-visual {
    overflow: hidden;
}

.ew-gc-catalog-card-visual img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.ew-gc-catalog-card:hover .ew-gc-catalog-card-visual img {
    transform: scale(1.03);
}

.ew-gc-catalog-card-design {
    background: linear-gradient(135deg, #1a0206 0%, #4a0a10 55%, #8A121F 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    color: #fff;
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ew-gc-catalog-card-brand {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 0.75rem;
}

.ew-gc-catalog-card-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
}

.ew-gc-catalog-card-amount {
    font-size: 3.5rem;
    font-weight: 900;
    color: #f5d0a9;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Card Info */
.ew-gc-catalog-card-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ew-gc-catalog-card-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #2d0007;
    margin: 0 0 0.5rem;
}

.ew-gc-catalog-card-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 1rem;
    flex-grow: 1;
}

.ew-gc-catalog-card-meta {
    margin-bottom: 1rem;
}

.ew-gc-catalog-card-validity {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f4f1f1;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
}

.ew-gc-catalog-card-cta {
    margin-top: auto;
}

.ew-gc-catalog-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #8A121F;
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.ew-gc-catalog-card:hover .ew-gc-catalog-btn {
    background: #6d0e18;
}

/* Info Section */
.ew-gc-catalog-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ew-gc-catalog-info-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.ew-gc-catalog-info-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.ew-gc-catalog-info-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #2d0007;
    margin: 0 0 0.5rem;
}

.ew-gc-catalog-info-item p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.ew-gc-catalog-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

/* Responsive */
@media (max-width: 992px) {
    .ew-gc-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ew-gc-catalog-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ew-gc-catalog-hero {
        padding: 2.5rem 1.5rem 2rem;
    }

    .ew-gc-catalog-title {
        font-size: 2rem;
    }

    .ew-gc-catalog-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .ew-gc-catalog-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ew-gc-catalog {
        padding: 0 0.5rem;
    }

    .ew-gc-catalog-hero {
        padding: 2rem 1rem;
        border-radius: 12px;
    }

    .ew-gc-catalog-title {
        font-size: 1.6rem;
    }

    .ew-gc-catalog-card-amount {
        font-size: 2.5rem;
    }
}

/* ========================================
   Gift Cards Strip (compact embed for other pages)
   ======================================== */

.ew-gc-strip {
    max-width: 1100px;
    margin: 2.5rem auto;
    padding: 2rem 1rem;
    text-align: center;
}

.ew-gc-strip-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2d0007;
    margin-bottom: 0.4rem;
}

.ew-gc-strip-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.8rem;
}

.ew-gc-strip-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.ew-gc-strip-card {
    display: block;
    text-decoration: none;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0d5d6;
    box-shadow: 0 4px 16px rgba(138, 18, 31, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ew-gc-strip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(138, 18, 31, 0.2);
}

.ew-gc-strip-card-visual {
    background: linear-gradient(135deg, #1a0206 0%, #4a0a10 55%, #8A121F 100%);
    padding: 1.8rem 1.2rem;
    color: #fff;
    text-align: center;
}

.ew-gc-strip-card-brand {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.2rem;
}

.ew-gc-strip-card-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.8rem;
}

.ew-gc-strip-card-amount {
    font-size: 2.5rem;
    font-weight: 900;
    color: #f5d0a9;
    line-height: 1;
}

.ew-gc-strip-card-cta {
    padding: 0.8rem;
    background: #fff;
    color: #8A121F;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 768px) {
    .ew-gc-strip-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }

    .ew-gc-strip-card-visual {
        padding: 1.2rem 0.8rem;
    }

    .ew-gc-strip-card-amount {
        font-size: 1.8rem;
    }

    .ew-gc-strip-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .ew-gc-strip-card-amount {
        font-size: 1.5rem;
    }

    .ew-gc-strip-card-cta {
        font-size: 0.75rem;
        padding: 0.6rem;
    }
}
