/* Gift Card Value Presets - Dynamic Grid with Corner Borders */
.value-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 20px;
    font-size: 1.84rem;
}

/* Corner border radius using nth-child for 6 items in 3x2 grid */
.value-preset:nth-child(1) {
    border-top-left-radius: 8px;
}

.value-preset:nth-child(3) {
    border-top-right-radius: 8px;
}

.value-preset:nth-child(4) {
    border-bottom-left-radius: 8px;
}

.value-preset:nth-child(6) {
    border-bottom-right-radius: 8px;
}

.value-preset {
    padding: 12px;
    border: 1px solid #D4D4D4;
    text-align: center;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.3s ease;
}

.value-preset:hover {
    border-color: #e53e3e;
}

.value-preset.selected {
    border-color: #e53e3e;
    background: #fdefef;
    color: #e53e3e;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {

    .image-container {
        width: 170px;
        height: 64px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .value-presets {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Update corner classes for 2-column layout on mobile */
    .value-preset:nth-child(1) {
        border-top-left-radius: 8px;
        border-top-right-radius: 0;
    }

    .value-preset:nth-child(2) {
        border-top-right-radius: 8px;
    }

    .value-preset:nth-child(3) {
        border-top-right-radius: 0;
        border-bottom-left-radius: 0;
    }

    .value-preset:nth-child(4) {
        border-bottom-left-radius: 8px;
    }

    .value-preset:nth-child(5) {
        border-bottom-right-radius: 0;
    }

    .value-preset:nth-child(6) {
        border-bottom-right-radius: 8px;
    }
}


.container-gift-card {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    justify-content: center;
    margin-bottom: 20px;
}

.preview-panel {
    width: 475px;
    height: 540px;
    padding: 30px;
    border: 1.5px solid #000;
    border-radius: 0;
    text-align: center;
    position: sticky;
    top: 20px;
}

.gift-card-preview {
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.gift-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.preview-amount {
    font-size: 5.008rem;
    font-weight: bold;
    color: #2A2A2A;
    margin: 20px 0 10px;
    letter-spacing: 2px;
    font-family: var(--font-display);
}

.preview-title {
    color: #000;
    font-size: 2.4rem;
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: 15px;
}

.preview-description {
    color: #2A2A2A;
    font-size: 1.808rem;
    line-height: 1.5;
    max-height: 60px;
    overflow: hidden;
    font-family: var(--font-book);
    font-weight: 400;
}

.customizer-panel {
    padding: 10px;
    border-radius: 12px;
}

.customizer-title {
    font-size: 1.84rem;
    font-weight: 400;
    color: #000;
    margin-bottom: 20px;
    font-family: var(--font-book);
    letter-spacing: 0.5px;
    text-transform: none;
}

.step {
    margin-bottom: 40px;
}

.step-title {
    font-size: 1.504rem;
    font-weight: 900;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.design-tabs {
    display: flex;
    margin-bottom: 20px;
    gap: 15px;
    width: 100%;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #000;
    background: #fff;
    color: #000;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    border-radius: 6px;
    font-size: 1.408rem;
}

.tab-button.active {
    background: #000;
    color: #fff;
}

.delivery-tabs .tab-button {
    flex: none;
    margin-right: 15px;
}

/* Carousel Styles */
#designCarousel {
    position: relative;
    width: 100%;
    padding: 0 50px;
}

#designCarousel .carousel-inner {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

#designCarousel .carousel-item {
    display: none;
    transition: transform 0.6s ease-in-out;
}

#designCarousel .carousel-item.active {
    display: flex !important;
    gap: 15px;
    justify-content: flex-start;
    padding: 10px 0;
    align-items: center;
}

/* Sliding animation classes */
#designCarousel .carousel-item.carousel-item-next,
#designCarousel .carousel-item.carousel-item-prev {
    display: flex !important;
    gap: 15px;
    justify-content: flex-start;
    padding: 10px 0;
    align-items: center;
}

#designCarousel .carousel-item-next.carousel-item-left,
#designCarousel .carousel-item-prev.carousel-item-right {
    transform: translateX(0);
}

#designCarousel .carousel-item-next,
#designCarousel .active.carousel-item-right {
    transform: translateX(100%);
}

#designCarousel .carousel-item-prev,
#designCarousel .active.carousel-item-left {
    transform: translateX(-100%);
}

.design-card {
    width: 210px;
    height: 133px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.design-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.design-card.selected {
    border-color: #920002;
    box-shadow: 0 8px 18px rgba(146, 0, 2, 0.25);
}

.design-card.selected::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(146, 0, 2, 0.24);
    border: 2px solid #920002;
    border-radius: 6px;
    pointer-events: none;
}

/* Custom carousel controls */
#designCarousel .carousel-control-prev,
#designCarousel .carousel-control-next {
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    top: 40%;
    transform: translateY(-50%);
    opacity: 1;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#designCarousel .carousel-control-prev {
    left: 10px;
}

#designCarousel .carousel-control-next {
    right: 10px;
}

#designCarousel .carousel-control-prev:hover,
#designCarousel .carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Custom indicators */
#designCarousel .carousel-indicators {
    position: static;
    margin: 15px 0 0 0;
    justify-content: center;
    gap: 8px;
}

#designCarousel .carousel-indicators li {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ccc;
    margin: 0;
    text-indent: unset;
    border: none;
    cursor: pointer;
}

#designCarousel .carousel-indicators .active {
    background: #920002;
    width: 8px;
    height: 8px;
}

.promo-text {
    color: var(--red);
    border-radius: 6px;
    font-size: 1.504rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-text);
}

/* Value presets styles moved to GiftCardStyles.css */

.custom-amount-label {
    display: block;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    font-size: 1.2rem;
    letter-spacing: 3px;
}

.custom-amount-container {
    position: relative;
    margin-bottom: 10px;
}

.custom-amount-input {
    width: 170px;
    padding: 12px 12px 12px 30px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1.6rem;
    transition: border-color 0.3s ease;
}

.custom-amount-input:focus {
    outline: none;
    border-color: #e53e3e;
}

/* Custom amount visual feedback styles */
.custom-amount-input.amount-warning {
    border-color: #f6ad55;
    background-color: #fffaf0;
    animation: pulse-warning 2s ease-in-out infinite;
}

.custom-amount-input.amount-limit {
    border-color: #e53e3e;
    background-color: #fed7d7;
    animation: flash-limit 0.5s ease-in-out;
}

@keyframes pulse-warning {

    0%,
    100% {
        border-color: #f6ad55;
        background-color: #fffaf0;
    }

    50% {
        border-color: #ed8936;
        background-color: #fef5e7;
    }
}

@keyframes flash-limit {
    0% {
        border-color: #e53e3e;
        background-color: #fed7d7;
        transform: scale(1);
    }

    50% {
        border-color: #c53030;
        background-color: #feb2b2;
        transform: scale(1.02);
    }

    100% {
        border-color: #e53e3e;
        background-color: #fed7d7;
        transform: scale(1);
    }
}

.currency-symbol {
    position: absolute;
    left: 1.5px;
    top: 50%;
    transform: translateY(-50%);
    color: #000;
    font-weight: 500;
    background-color: #D4D4D4;
    padding: 12px;
    border-radius: 5px;
}

.amount-range {
    font-size: 1.408rem;
    color: #2A2A2A;
    font-family: var(--font-book);
    letter-spacing: .5px;
    font-weight: 400;
}

.quantity-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.message-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1.6rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.message-textarea:focus {
    outline: none;
    border-color: #e53e3e;
}

.character-count {
    text-align: left;
    font-size: 1.408rem;
    font-family: var(--font-book);
    font-weight: 400;
    letter-spacing: .5px;
}

.delivery-tabs {
    display: flex;
    margin-bottom: 20px;
    gap: 15px;
}

.delivery-info {
    font-size: 1.84rem;
    margin-bottom: 20px;
    font-weight: 400;
    letter-spacing: 0;
    font-family: var(--font-book);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    text-transform: uppercase;
    font-size: 1.44rem;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1.6rem;
    transition: border-color 0.3s ease;
    resize: vertical;
}

.form-input-2 {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1.6rem;
    transition: border-color 0.3s ease;
    resize: vertical;
    height: 48px;
    box-sizing: border-box;
}

.form-input:focus,
.form-input-2:focus {
    outline: none;
    border-color: #e53e3e;
}

.date-container {
    position: relative;
}

.date-input-calendar {
    padding-right: 40px;
    font-size: 1.84rem;
    font-family: var(--font-text);
    font-weight: 400;
    color: #2A2A2A;
}

.email-info {
    font-size: 1.28rem;
    color: #666;
    margin-top: 5px;
}

.form-input.input-error {
    border-color: #e53e3e;
}

.validation-message {
    display: none;
    font-size: 1.28rem;
    color: #e53e3e;
    margin-top: 5px;
}

.delivery-note {
    font-size: 1.28rem;
    color: #666;
    margin-top: 10px;
}

.total-section {
    border-radius: 8px;
    margin-top: 30px;
    line-height: 1;
}

.total-label {
    font-size: 1.6rem;
    color: #333;
    text-transform: uppercase;
    font-weight: bold;
    font-family: var(--font-text);
    font-weight: 700;
}

.total-amount {
    font-size: 3.2rem;
    font-weight: bold;
    color: #333;
    font-family: var(--font-text);
    display: inline-block;
    line-height: 1;
}

.total-decimals {
    font-size: 0.5em;
    vertical-align: super;
    margin-left: 2px;
}

/* Sticky Buttons */
.sticky-buttons {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background-color: white;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.quantity-info {
    font-family: var(--font-book);
    font-size: 1.408rem;
    font-weight: 400;
    letter-spacing: .5px;
    line-height: 20px;
}

.form-inline {
    display: flex;
    gap: 20px;
}

.inline-field {
    flex: 1;
}

.input-with-icon {
    position: relative;
}

.input-with-icon .form-input {
    padding-right: 35px;
}

.alert-icon-container {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    cursor: help;
}

.alert-icon {
    width: 20px;
    height: 20px;
    color: #a0aec0;
    transition: color 0.2s ease-in-out;
}

.tooltip-message {
    visibility: hidden;
    opacity: 0;
    width: 200px;
    background-color: white;
    color: #2d3748;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    position: absolute;
    z-index: 1;
    transition: opacity 0.2s ease-in-out;
    top: 100%;
    right: 0;
    margin-top: 8px;
}

.tooltip-message::after {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 10px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent white transparent;
}

.alert-icon-container:hover .tooltip-message {
    visibility: visible;
    opacity: 1;
}

.alert-icon-container:hover .alert-icon {
    color: #e53e3e;
}

/* === Modal General === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.show {
    display: flex;
}

#previewModal .modal-dialog {
    max-width: 848px;
    max-height: 748px;
    padding: 0;
    border-radius: 8px;
    /*overflow: hidden;*/
}

.modal-content {
    /*max-width: 584px; */
    height: auto;
    background: #fff;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 3.2rem;
    cursor: pointer;
    color: #666;
    z-index: 10;
}

.modal-banner {
    width: 100%;
    height: 77px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-banner img {
    max-height: 60px;
    object-fit: contain;
    margin: 20px;
}

.modal-preview {
    width: 100%;
    aspect-ratio: 584 / 243;
    height: auto;

    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
}

.modal-surprise-text {
    font-family: var(--font-display);
    font-size: 3.6rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    flex-shrink: 0;
}

.modal-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.modal-surprise-text {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-size: 3.6rem;
    font-weight: 900;
    text-align: left;
    line-height: 1.1;
    z-index: 2;
    max-width: 50%;

}

/* Greeting */
.greeting-section {
    width: 90%;
    max-width: 548px;
    margin: 20px auto 20px auto;
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Gift Info */
.gift-info-section {
    width: 90%;
    max-width: 548px;
    height: 163px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-amount {
    font-size: 3.0rem;
    font-weight: 900;
    color: var(--red);
    margin-bottom: 6px;
}

.info-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-message {
    font-size: 1.8rem;
    color: #444;
    line-height: 1.4;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .image-container {
        width: 170px;
        height: 64px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .container-gift-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }

    .preview-panel {
        position: static;
        width: 100%;
        height: auto;
    }

    .gift-card-preview {
        width: 100%;
        max-width: 361px;
    }

    .sticky-buttons {
        position: static;
        margin-top: 30px;
        justify-content: center;
    }

    /* Value presets responsive styles moved to GiftCardStyles.css */

    .design-tabs {
        flex-direction: column;
        gap: 10px;
    }

    .delivery-tabs {
        flex-direction: column;
        gap: 10px;
    }

    .delivery-tabs .tab-button {
        margin-right: 0;
    }

    .form-inline {
        flex-direction: column;
        gap: 15px;
    }

    /* Carousel responsive */
    #designCarousel {
        padding: 0 30px;
    }

    #designCarousel .carousel-item.active {
        justify-content: center;
        gap: 10px;
    }

    .design-card {
        width: 180px;
        height: 113px;
    }

    #designCarousel .carousel-control-prev {
        left: 5px;
    }

    #designCarousel .carousel-control-next {
        right: 5px;
    }

    #designCarousel .carousel-control-prev,
    #designCarousel .carousel-control-next {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .image-container {
        width: 170px;
        height: 64px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #designCarousel {
        padding: 0 20px;
    }

    .design-card {
        width: 160px;
        height: 100px;
    }

    #designCarousel .carousel-control-prev,
    #designCarousel .carousel-control-next {
        width: 25px;
        height: 25px;
    }
}


.egift-card .title-price {
    font-size: 2.8rem;
}

.egift-card .price {
    font-size: 3.04rem;
}

.egift-card .price-red {
    color: var(--longos-red);
    font-size: 3.04rem;

}

.egift-card .promo-product-points {
    color: var(--longos-red);
    font-size: 2.4rem;
    font-weight: 400;

}

.image-container {
    width: 170px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.egift-card .promo-points {
    color: var(--longos-red);
    font-size: 1.2rem;
    font-weight: 600;
    font-family: var(--font-text);
    text-transform: uppercase;

}

@media (max-width: 768px) {
    .egift-card img {
        justify-content: center;
        display: flex;
        top: 50px;
        position: relative;
        align-items: center;
    }

    .egift-card h2 {
        text-align: left;
    }

    .egift-card .title-price {
        text-align: left;
    }
}

@media (max-width: 600px) {

    .image-container {
        width: 170px;
        height: 64px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-dialog {
        width: 95%;
        /*max-width: 584px;*/
        height: 95%;
        margin: 20px auto;
    }


    .modal-banner,
    .modal-preview,
    .greeting-section,
    .gift-info-section {
        width: 100%;
        height: auto;
    }

    .modal-surprise-text {
        font-size: 2.4rem;
        max-width: 60%;
        left: 5%;
    }

    .greeting-section,
    .gift-info-section {
        margin: 15px 5%;
        padding: 20px;
        width: 90%;
    }

    .info-amount {
        font-size: 2.6rem;
        font-weight: 900;
    }

    .info-message {
        font-size: 1.8rem;
        font-weight: 400;
    }

    .info-title {
        font-size: 1.7rem;
        font-weight: 900;
    }

    .modal-close {
        top: 5px;
        right: 5px;
    }
}

/* Remove button styling for gift cards - matches default cart styling */
.egift-card .remove-item {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='13' viewBox='0 0 14 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.51827 1.34281L12.2663 12.0908' stroke='%23D5181A' stroke-width='1.2' stroke-linecap='square'/%3E%3Cpath d='M12.2663 1.34281L1.51825 12.0908' stroke='%23D5181A' stroke-width='1.2' stroke-linecap='square'/%3E%3C/svg%3E%0A");
    background-repeat: no-repeat;
    background-position: center;
    appearance: none;
    border: 0 none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.egift-card .remove-item:hover {
    opacity: 0.7;
}