/* =============================================================================
   VimirLab GiftCard — all rules scoped to module containers to avoid theme conflicts.
   Loaded globally via default.xml; never use bare generic selectors (.form-group, .required, etc.).
   ============================================================================= */

/* 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 / purchase form */
.vimirlab-giftcard-product {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 0 48px 0;
}

.vimirlab-giftcard-product .giftcard-product-top {
    margin-bottom: 32px;
    text-align: center;
}

.vimirlab-giftcard-product .giftcard-product-title {
    margin: 0 0 12px;
    font-size: 34px;
    font-weight: 600;
    color: #333;
}

.vimirlab-giftcard-product .giftcard-product-description {
    max-width: 760px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

.vimirlab-giftcard-product .giftcard-product-layout {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.vimirlab-giftcard-product .giftcard-product-media {
    position: sticky;
    top: 24px;
}

.vimirlab-giftcard-product .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%);
}

.vimirlab-giftcard-product .giftcard-preview-image {
    display: block;
    width: 100%;
    height: auto;
}

.vimirlab-giftcard-product .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;
}

.vimirlab-giftcard-product .giftcard-preview-amount {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.vimirlab-giftcard-product .giftcard-preview-recipient {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    opacity: 0.9;
}

.vimirlab-giftcard-product .giftcard-design-picker {
    margin-top: 24px;
}

.vimirlab-giftcard-product .giftcard-design-picker h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vimirlab-giftcard-product .giftcard-design-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 5px;
    padding: 14px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #f8f8f8;
}

.vimirlab-giftcard-product .giftcard-design-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    font: inherit;
    color: inherit;
    width: 100%;
    min-height: 0;
}

.vimirlab-giftcard-product .giftcard-design-option:hover {
    border-color: #83b735;
    transform: translateY(-1px);
}

.vimirlab-giftcard-product .giftcard-design-option.active {
    border-color: #83b735;
    box-shadow: 0 0 0 2px rgba(131, 183, 53, 0.28);
    background: #83b735 !Important;
    span {
        color: #fff !important;
    }
}

.vimirlab-giftcard-product .giftcard-design-option img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    background: #f0f0f0;
}

.vimirlab-giftcard-product .giftcard-design-option span {
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    color: #555;
}

.vimirlab-giftcard-product .giftcard-panel {
    margin-bottom: 20px;
    padding: 24px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fff;
}

.vimirlab-giftcard-product .giftcard-panel h2 {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.vimirlab-giftcard-product .panel-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.vimirlab-giftcard-product .amount-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vimirlab-giftcard-product .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: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    font-family: inherit;
}

.vimirlab-giftcard-product .amount-btn:hover {
    border-color: #5a8f24 !important;
    color: #5a8f24;
    background: #f9fbf6;
}

.vimirlab-giftcard-product .amount-btn.active {
    border-color: #83b735;
    background: #83b735 !important;
    color: #fff;
    box-shadow: 0 2px 8px rgba(131, 183, 53, 0.35);
}

.vimirlab-giftcard-product .giftcard-custom-amount {
    margin-top: 20px;
}

.vimirlab-giftcard-product .giftcard-custom-amount label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.vimirlab-giftcard-product .custom-amount-field {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.vimirlab-giftcard-product .custom-amount-field .currency-prefix {
    padding: 0 12px;
    font-weight: 600;
    color: #666;
    background: #f5f5f5;
    align-self: stretch;
    display: flex;
    align-items: center;
}

.vimirlab-giftcard-product .custom-amount-field input {
    flex: 1;
    border: 0;
    padding: 12px;
    font-size: 16px;
}

.vimirlab-giftcard-product .custom-amount-field input:focus {
    outline: none;
}

.vimirlab-giftcard-product .help-text {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

.vimirlab-giftcard-product .form-group {
    margin-bottom: 16px;
}

.vimirlab-giftcard-product .form-group:last-child {
    margin-bottom: 0;
}

.vimirlab-giftcard-product .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.vimirlab-giftcard-product .required {
    color: #747474;
}

.vimirlab-giftcard-product .form-group input,
.vimirlab-giftcard-product .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.vimirlab-giftcard-product .form-group input:focus,
.vimirlab-giftcard-product .form-group textarea:focus {
    border-color: #1979c3;
    outline: none;
    box-shadow: 0 0 0 1px #1979c3;
}

.vimirlab-giftcard-product .form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.vimirlab-giftcard-product .giftcard-order-summary {
    margin-bottom: 20px;
    padding: 20px 24px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fafafa;
}

.vimirlab-giftcard-product .giftcard-order-summary .summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #ececec;
}

.vimirlab-giftcard-product .giftcard-order-summary .summary-row:last-child {
    border-bottom: 0;
}

.vimirlab-giftcard-product .giftcard-order-summary .summary-row span {
    color: #666;
}

.vimirlab-giftcard-product .giftcard-order-summary .summary-row strong {
    color: #333;
    text-align: right;
}

.vimirlab-giftcard-product .giftcard-product-actions .action.primary.tocart {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
}

@media (max-width: 910px) and (min-width: 768px) {
    .vimirlab-giftcard-category-page .products.products-grid .product-items .product-item .product-item-info {
        padding: 10px;
    }
}


@media (max-width: 991px) {
    .vimirlab-giftcard-product .giftcard-product-layout {
        grid-template-columns: 1fr;
    }

    .vimirlab-giftcard-product .giftcard-product-media {
        position: static;
    }
}

@media (max-width: 767px) {
    .vimirlab-giftcard-product {
        padding: 16px 12px 32px;
    }

    .vimirlab-giftcard-product .giftcard-product-title {
        font-size: 26px;
    }

    .vimirlab-giftcard-product .giftcard-panel {
        padding: 18px;
    }

    .vimirlab-giftcard-product .amount-btn-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vimirlab-giftcard-product .amount-btn-group .amount-btn {
        width: 100%;
        min-width: 0;
    }
    .vimirlab-giftcard-category-page.catalog-category-view .column.main .products-grid .product-item .product-item-info .product-item-details .addtocart_position_3 {
        margin: inherit;
        display: block;
        position: relative;
        top: unset;
        right: unset;
        width: 100%;
    }
    .vimirlab-giftcard-category-page.catalog-category-view .column.main .products-grid .product-item .product-item-info .product_image {
        width: 100%;
    }
}

/* Catalog gift card PDP layout */
.vimirlab-giftcard-product-page .product-info-main {
    width: 100% !important;
    float: none !important;
    display: none;
}

.vimirlab-giftcard-product-page .column.main {
    width: 100%;
}

.vimirlab-giftcard-product--catalog {
    max-width: 1280px;
    margin: 0 auto;
}

.vimirlab-giftcard-product--catalog .giftcard-catalog-intro {
    margin-bottom: 16px;
}

.vimirlab-giftcard-product--catalog .giftcard-product-name {
    margin: 0 0 12px;
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.vimirlab-giftcard-product--catalog .giftcard-product-details-price {
    margin: 0 0 16px;
}

.vimirlab-giftcard-product--catalog .giftcard-product-starting-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    margin: 0 0 12px;
}

.vimirlab-giftcard-product--catalog .giftcard-product-starting-price .price-box {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
}

.vimirlab-giftcard-product--catalog .giftcard-product-starting-price .price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.vimirlab-giftcard-product--catalog .giftcard-product-starting-price .giftcard-price-from {
    font-size: 1rem;
    font-weight: 500;
    color: #666;
}

.vimirlab-giftcard-product--catalog .giftcard-catalog-intro .giftcard-product-description {
    margin: 0;
    color: #666;
    line-height: 1.6;
    font-size: 15px;
}

.vimirlab-giftcard-product-page .vimirlab-giftcard-product--catalog .giftcard-preview-card {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.vimirlab-giftcard-product-page .vimirlab-giftcard-product--catalog .giftcard-product-actions .action.primary.tocart {
    background: #83b735;
    border-color: #83b735;
}

.vimirlab-giftcard-product-page .vimirlab-giftcard-product--catalog .giftcard-product-actions .action.primary.tocart:hover {
    background: #ffffff;
    border-color: #739e2f;
}

/* "From" / "Start from" price prefix */
.vimirlab-giftcard-category-page .giftcard-price-from,
.vimirlab-giftcard-product-page .giftcard-price-from {
    font-size: inherit;
    font-weight: 400;
    text-transform: none;
    color: #666;
    white-space: nowrap;
}

/* Category listing: inline "Fra" + price + unit suffix (e.g. per envelope) */
.vimirlab-giftcard-category-page .giftcard-category-price-block {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.2rem 0.35rem;
    width: 100%;
    margin: 0.35rem 0 0.65rem;
    text-align: center;
    line-height: 1.35;
}

.vimirlab-giftcard-category-page .giftcard-category-price-block .giftcard-category-price {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.2rem 0.35rem;
    margin: 0;
    width: auto;
}

.vimirlab-giftcard-category-page .giftcard-category-price-block > * {
    margin: 0;
}

.vimirlab-giftcard-category-page .giftcard-category-price-block .price-box,
.vimirlab-giftcard-category-page .giftcard-category-price-block .product-item-description,
.vimirlab-giftcard-category-page .giftcard-category-price-block .product-item-details-price,
.vimirlab-giftcard-category-page .giftcard-category-price-block p,
.vimirlab-giftcard-category-page .giftcard-category-price-block span:not(.giftcard-price-from):not(.price) {
    display: inline;
    font-size: inherit;
    font-weight: 400;
    color: #666;
}

.vimirlab-giftcard-category-page .giftcard-category-price {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.2rem 0.35rem;
    width: auto;
    margin: 0;
    text-align: center;
    line-height: 1.35;
}

.vimirlab-giftcard-category-page .giftcard-category-price .price-box {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.2rem 0.35rem;
    margin: 0;
    padding: 0;
}

.vimirlab-giftcard-category-page .giftcard-category-price .price-container,
.vimirlab-giftcard-category-page .giftcard-category-price .price-wrapper,
.vimirlab-giftcard-category-page .giftcard-category-price .price-label {
    display: inline;
    margin: 0;
    padding: 0;
}

.vimirlab-giftcard-category-page .giftcard-category-price .price {
    font-weight: 700;
    color: #333;
}

/* Category listing: tighter product card layout for gift cards */
.vimirlab-giftcard-category-page .product-item-info .product-item-details {
    text-align: center;
    padding-bottom: 0.5rem;
}

.vimirlab-giftcard-category-page .product-item-info .product-item-name {
    margin: 0.65rem 0 0.25rem;
    min-height: 0;
}

.vimirlab-giftcard-category-page .product-item-info .product-item-inner {
    margin-top: 0.35rem;
    padding-top: 0;
}

.vimirlab-giftcard-category-page .product-item-info .product-item-inner-hide {
    display: none;
}

.vimirlab-giftcard-category-page .product-item-info .product-item-actions {
    margin-top: 0;
}

.vimirlab-giftcard-category-page .product-item-info .actions-primary {
    width: 100%;
}

.vimirlab-giftcard-category-page .product-item-info .addtocart_position_1,
.vimirlab-giftcard-category-page .product-item-info .addtocart_position_2,
.vimirlab-giftcard-category-page .product-item-info .addtocart_position_3,
.vimirlab-giftcard-category-page .product-item-info .addtocart_position_4,
.vimirlab-giftcard-category-page .product-item-info .addtocart_position_5,
.vimirlab-giftcard-category-page .product-item-info .addtocart_position_6 {
    width: 100%;
}

/* Category listing: gift card configure CTA */
.vimirlab-giftcard-category-page .product-item-info .action.giftcard-configure {
    display: inline-block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    margin-top: 0;
    padding: 0.75rem 1rem;
}

/* Gift Cards category: hide nutrition modal */
.vimirlab-giftcard-category-page .modal_nutrion {
    display: none !important;
}

/* Gift card purchase checkout: hide Swissup "Additional Information" fields */
.vimirlab-giftcard-purchase-checkout .fieldset.swissup-checkout-fields {
    display: none !important;
}

/* Gift card only cart/checkout: hide "Ordre Total ekskl. moms" */
.vimirlab-giftcard-purchase-checkout .grand.totals.excl {
    display: none !important;
}

.vimirlab-giftcard-category-page .column.main .products-grid .product-item .product-item-info .addtocart_position_3.center {
    order: 3;
}

.vimirlab-giftcard-product-page .giftcard-design-options button {
    background-color: #ffffff !important;
        span {
            color: #232323 !important;
        }
}

.vimirlab-giftcard-product-page .giftcard-amount-options button {
    background-color: #ffffff !important;
}

.vimirlab-giftcard-checkout .vimirlab-giftcard-message {
    margin-top: 10px;
}
