/* Cart & checkout gift card redemption */
.vimirlab-giftcard-cart {
    margin: 15px 0;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
}

.opc-block-summary .vimirlab-giftcard-checkout,
.cart-summary .vimirlab-giftcard-cart {
    margin: 0 0 15px;
}

.opc-block-summary .vimirlab-giftcard-checkout .giftcard-applied {
    flex-direction: column;
    align-items: flex-start;
}

.opc-block-summary .vimirlab-giftcard-checkout .field-row {
    flex-direction: column;
}

.opc-block-summary .vimirlab-giftcard-checkout .field-row .action.apply {
    width: 100%;
}

.vimirlab-giftcard-cart .field-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.vimirlab-giftcard-cart input[type="text"] {
    flex: 1;
    padding: 8px;
}

.vimirlab-giftcard-cart .giftcard-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.vimirlab-giftcard-cart .label {
    font-weight: 600;
}

.cart-totals .totals.vimirlab-giftcard .amount .price,
.opc-block-summary .table-totals .totals.vimirlab-giftcard .amount .price {
    color: #006400;
}

/* Gift card product page */
.vimirlab-giftcard-product {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.giftcard-product-top {
    margin-bottom: 32px;
    text-align: center;
}

.giftcard-product-title {
    margin: 0 0 12px;
    font-size: 34px;
    font-weight: 600;
    color: #333;
}

.giftcard-product-description {
    max-width: 760px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

.giftcard-product-layout {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.giftcard-product-media {
    position: sticky;
    top: 24px;
}

.giftcard-preview-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    background: linear-gradient(135deg, #1979c3 0%, #145ca8 100%);
}

.giftcard-preview-image {
    display: block;
    width: 100%;
    height: auto;
}

.giftcard-preview-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px 24px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 100%);
    color: #fff;
}

.giftcard-preview-amount {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.giftcard-preview-recipient {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    opacity: 0.9;
}

.giftcard-design-picker {
    margin-top: 24px;
}

.giftcard-design-picker h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.giftcard-design-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
}

.giftcard-design-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.giftcard-design-option:hover,
.giftcard-design-option.active {
    border-color: #1979c3;
    box-shadow: 0 0 0 1px #1979c3;
}

.giftcard-design-option img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.giftcard-design-option span {
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    color: #555;
}

.giftcard-panel {
    margin-bottom: 20px;
    padding: 24px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fff;
}

.giftcard-panel h2 {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.panel-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.amount-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.amount-btn {
    min-width: 96px;
    padding: 12px 16px;
    border: 2px solid #d5d5d5;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.amount-btn:hover,
.amount-btn.active {
    border-color: #1979c3;
    color: #1979c3;
    background: #f3f9ff;
}

.giftcard-custom-amount {
    margin-top: 20px;
}

.giftcard-custom-amount label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.custom-amount-field {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.custom-amount-field .currency-prefix {
    padding: 0 12px;
    font-weight: 600;
    color: #666;
    background: #f5f5f5;
    align-self: stretch;
    display: flex;
    align-items: center;
}

.custom-amount-field input {
    flex: 1;
    border: 0;
    padding: 12px;
    font-size: 16px;
}

.custom-amount-field input:focus {
    outline: none;
}

.help-text {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.required {
    color: #e02b27;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #1979c3;
    outline: none;
    box-shadow: 0 0 0 1px #1979c3;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.giftcard-order-summary {
    margin-bottom: 20px;
    padding: 20px 24px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fafafa;
}

.giftcard-order-summary .summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #ececec;
}

.giftcard-order-summary .summary-row:last-child {
    border-bottom: 0;
}

.giftcard-order-summary .summary-row span {
    color: #666;
}

.giftcard-order-summary .summary-row strong {
    color: #333;
    text-align: right;
}

.giftcard-product-actions .action.primary.tocart {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
}

@media (max-width: 991px) {
    .giftcard-product-layout {
        grid-template-columns: 1fr;
    }

    .giftcard-product-media {
        position: static;
    }
}

@media (max-width: 767px) {
    .vimirlab-giftcard-product {
        padding: 16px 12px 32px;
    }

    .giftcard-product-title {
        font-size: 26px;
    }

    .giftcard-panel {
        padding: 18px;
    }

    .amount-btn-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Catalog product page (Amasty-style PDP) */
.vimirlab-giftcard-product-page .product-info-main {
    width: 100% !important;
    float: none !important;
}

.vimirlab-giftcard-product-page .column.main {
    width: 100%;
}

.vimirlab-giftcard-product--catalog {
    max-width: 1200px;
    margin: 0 auto;
}

.vimirlab-giftcard-product--catalog .giftcard-catalog-intro {
    margin-bottom: 16px;
}

.vimirlab-giftcard-product--catalog .giftcard-catalog-intro .giftcard-product-description {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.giftcard-price-from {
    font-size: 0.85em;
    font-weight: 400;
    text-transform: capitalize;
    color: #666;
}
