.gift-card-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.amount-section {
    margin-bottom: 30px;
    text-align: center;
}

.amount-label {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.amount-input-container {
    display: inline-block;
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 15px;
    background: #fff;
}

.currency-symbol {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #333;
}

.amount-input {
    font-size: 24px;
    padding: 10px 10px 10px 35px;
    width: 200px;
    border: none;
    text-align: center;
    font-weight: 600;
}

.amount-input:focus {
    outline: none;
}

.info-section {
    margin-top: 40px;
}

.section-heading {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.info-container {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
}

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

.form-row:last-child {
    margin-bottom: 0;
}

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

.form-row input,
.form-row select {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    height: 50px; /* Added explicit height */
    line-height: normal;
}

.submit-button {
    background-color: #4CAF50;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 30px;
}

.submit-button:hover {
    background-color: #45a049;
}

.design-carousel {
    position: relative;
    padding: 0 40px;
    margin: 20px 0;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
}

.carousel-button:hover {
    background: #f5f5f5;
}

.carousel-button.prev {
    left: 0;
}

.carousel-button.next {
    right: 0;
}

.design-carousel-container {
    overflow: hidden;
}

.design-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
}

.design-option {
    flex: 0 0 100px;
    margin: 0 10px;
    cursor: pointer;
    text-align: center;
}

.design-option img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.design-option.selected img {
    border-color: #4CAF50;
}

.design-name {
    display: block;
    font-size: 12px;
    margin-top: 5px;
    color: #666;
}

.woocommerce-order-gift-card {
    margin: 2em 0;
    padding: 2em;
    background: #f8f8f8;
    border-radius: 4px;
    text-align: center;
}

.woocommerce-order-gift-card h2 {
    margin-bottom: 1em;
}

.woocommerce-order-gift-card .button {
    display: inline-block;
    padding: 1em 2em;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 1em;
}

.woocommerce-order-gift-card .button:hover {
    background: #135e96;
}



/* Language select styling */
.form-row select {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    background-color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

/* Message textarea styling */
.form-row textarea {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 16px;
    min-height: 150px; /* Increased minimum height */
    resize: vertical;
    font-family: inherit;
}

/* Focus states */
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

/* Email design section */
.email-design-section {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

/* Error states */
.error {
    border-color: #ff4444 !important;
}

.error-message {
    color: #ff4444;
    font-size: 14px;
    margin-top: 5px;
    display: block;
    padding-left: 20px;
}

/* Design selection */
.design-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.design-option {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.design-option input[type="radio"] {
    display: none;
}

.design-option label {
    cursor: pointer;
}

.design-option img {
    width: 100%;
    height: 200px; /* Fixed height */
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid transparent;
}

.design-option.selected {
    transform: scale(1.02);
}

.design-option.selected img {
    border-color: #4CAF50;
}

/* Delivery options styling */
.delivery-options {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.delivery-options legend {
    font-weight: 500;
    color: #333;
    padding: 0 10px;
}

.delivery-option {
    margin: 10px 0;
}

.delivery-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.delivery-option input[type="radio"] {
    margin-right: 10px;
}

.design-carousel-wrapper {
    position: relative;
    padding: 0 50px; /* Padding for navigation buttons */
    margin: 20px 0;
    overflow: visible; /* Ensure buttons outside container are visible */
}

.design-carousel {
    overflow: hidden;
    margin: 0 auto;
    position: relative;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.design-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    padding: 10px 0;
    will-change: transform; /* Optimize for animations */
}

.design-option {
    flex: 0 0 200px; /* Fixed width for each design option */
    margin: 0 10px;
    padding: 10px;
    transition: all 0.3s ease;
    user-select: none; /* Prevent text selection during swipe */
    -webkit-user-select: none;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 2px solid #2271b1;
    border-radius: 50%;
    background: #fff;
    color: #2271b1;
    font-size: 24px;
    line-height: 36px; /* Center the arrow vertically */
    text-align: center;
    cursor: pointer;
    z-index: 10; /* Ensure buttons are above other elements */
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    outline: none; /* Remove outline on focus */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.carousel-nav:hover {
    background: #2271b1;
    color: #fff;
}

.carousel-nav.disabled {
    background: #f0f0f0;
    border-color: #ccc;
    color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none; /* Prevent clicks when disabled */
}

.carousel-nav.prev {
    left: 0;
}

.carousel-nav.next {
    right: 0;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .carousel-nav {
        width: 36px;
        height: 36px;
        line-height: 32px;
        font-size: 20px;
        background: rgba(255,255,255,0.9);
    }
    
    .design-carousel-wrapper {
        padding: 0 40px;
    }
    
    .design-carousel-wrapper::before {
        content: "← Swipe →";
        display: block;
        text-align: center;
        font-size: 12px;
        color: #666;
        margin-bottom: 5px;
    }
    
    .design-option {
        flex: 0 0 150px; /* Smaller width on mobile */
    }
}

/* Ensure carousel is visible on small screens */
@media (max-width: 480px) {
    .design-carousel-wrapper {
        padding: 0 35px;
    }
    
    .carousel-nav {
        width: 30px;
        height: 30px;
        line-height: 26px;
        font-size: 18px;
    }
    
    .design-option {
        flex: 0 0 120px; /* Even smaller on very small screens */
        margin: 0 5px;
    }
}

.design-option img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.design-option.selected img {
    border-color: #2271b1;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.design-name {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
    .amount-input {
        width: 150px;
    }
    
    .design-option img {
        height: 120px;
    }
    
    .form-row input,
    .form-row select,
    .form-row textarea {
        font-size: 16px; /* Prevent zoom on focus in iOS */
    }
    
    .info-section,
    .delivery-options,
    .email-design-section {
        margin-top: 20px;
    }
    
    .submit-button {
        margin-top: 20px;
        padding: 12px 20px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .design-option img {
        height: 100px;
    }
    
    .design-name {
        font-size: 12px;
    }
    
    .amount-input-container {
        width: 100%;
    }
    
    .amount-input {
        width: 100%;
        box-sizing: border-box;
    }
}