/* === HIDE DEFAULT WC === */
/* Hide default add-to-cart and quantity */
.single_add_to_cart_button,
.woocommerce-variation-add-to-cart,
.quantity {
    display: none !important;
}

/* Hide Imran / Woo clear (reset) variations button */
.reset_variations,
a.reset_variations,
button.reset_variations {
    display: none !important;
}


/* Keep the form visible for swatches plugin */
.product form.cart {
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
}


/* === Wrapper === */
#ilyes-ec-wrapper {
    background: #ffffff;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    max-width: 440px; 
    margin: 30px auto;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    color: #333;
}

#ilyes-ec-wrapper h4{
    font-size: 18px;
}

/* === Field === */
.ilyes-ec-field label {
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
    display: block;
}

.ilyes-ec-field input,
.ilyes-ec-field select {
    width: 100%;
    padding: 12px 12px;
    border: 2px solid #ccc  !important;
    border-radius: 4px;
    background: #fff;
    font-size: 16px;
    transition: border-color 0.3s, background 0.3s;
    direction: rtl;
}

.ilyes-ec-field input:focus,
.ilyes-ec-field select:focus {
    border: 2px solid #ccc  !important; 
    background: #fff;
    outline: none;
}

/* === Swatch Attributes === */
.ilyes-ec-attribute-group {
    margin-bottom: 12px;
}

.ilyes-ec-attribute-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #222;
}

.ilyes-ec-swatch-options {
    display: flex;
    flex-wrap: wrap;
}

.ilyes-ec-swatch {
    padding: 8px 12px;
    margin: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f9f9f9;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
}

.ilyes-ec-swatch:hover {
    background: #eaf3ff;
    border-color: #007bff;
}

.ilyes-ec-swatch.selected {
    border-color: #0056b3;
    box-shadow: #000000 0px 0px 5px 0px;
}

/* === Shipping Options === */
#ilyes-ec-shipping-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.ilyes-ec-shipping-option {
    position: relative;
    padding: 12px 12px 12px 42px;
    background: var(--shipping-bg, #f1f5ff);
    border: 2px solid var(--shipping-border, #cfe0ff);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.25s ease;
}

/* === Submit Button === */
#ilyes_ec_submit {
    background-color: #ff5100;
    color: #fff;
    padding: 16px;
    width: 100%;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

@keyframes ilyes-shake-loop {
    0% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-6px); }
    100% { transform: translateX(0); }
}

#ilyes_ec_submit.attention {
    animation: ilyes-shake-loop 2s infinite;
}


/* === Message Box === */
.ilyes-ec-message {
    display: none;
    margin-top: 16px;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.ilyes-ec-message.success {
    background-color: #d1f5d3;
    color: #276b2b;
    border: 2px solid #a3e4a7;
}

.ilyes-ec-message.error {
    background-color: #fbdada;
    color: #842029;
    border: 2px solid #f5c2c7;
}

/* === Order Summary === */
/* Wrapper */


/* Heading */
.ilyes-ec-order-summary h3 {
    margin: 0;
    font-size: 18px;
    color: var(--order-summary-heading-color);
}

/* Table */
.ilyes-ec-order-summary table {
    width: 100%;
    border-width: 1px 0 0 0;
    font-size: 14px;
}

/* Cells */
.ilyes-ec-order-summary td {
    padding: 10px 12px;
    vertical-align: middle;
    border-width: 0 0 1px 0;
}

/* Label column */
.ilyes-ec-order-summary td.label {
    font-weight: 600;
    width: 40%;
    text-align: right;
    border-width: 0 0 1px 0;
}

/* Value column */
.ilyes-ec-order-summary td:not(.label) {
    text-align: left;
    border-width: 0;
    border-width: 0 0 1px 0;
}

/* Total row */
.ilyes-ec-order-summary tr.total td {
    font-weight: bold;
    border-width: 0;
}


/* === Responsive === */
@media (max-width: 500px) {
    #ilyes-ec-wrapper {
        padding: 18px;
    }

    .ilyes-ec-field {
        margin-bottom: 8px;
    }

    #ilyes_ec_submit {
        font-size: 15px;
    }

    .ilyes-ec-swatch {
        padding: 4px 4px;
        font-size: 14px;
        margin : 4px;
    }

    /* === Order Summary === */
.ilyes-ec-order-summary {
    margin-top: 8px;
}
}

.ilyes-ec-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.ilyes-ec-field input,
.ilyes-ec-field select {
    width: 100%;
    padding: 6px;
    box-sizing: border-box;
}


.whatsapp-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    width: 100%;
}

.ilyes-whatsapp-button {
    background-color: #25D366;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
    display: inline-block;
}
.ilyes-whatsapp-button:hover {
    background-color: #1ebe5b;
    color: #fff;
}

.client-info-section.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns of equal width */
    gap: 12px; /* space between fields */
}

/* Make it responsive for smaller screens */
@media (max-width: 500px) {
    .client-info-section.grid-2 {
        grid-template-columns: 1fr; /* 1 column on mobile */
        gap: 6px;
    }
}

#ilyes-ec-sticky-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    padding: 8px;
    z-index: 9999;
}

#ilyes-ec-sticky-button {
    background-color: <?php echo esc_html(get_theme_mod('ilyes_ec_button_color', '#ff5100')); ?>;
    color: <?php echo esc_html(get_theme_mod('ilyes_ec_button_text_color', '#ffffff')); ?>;
    font-family: inherit;
    padding: 16px 25px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: block;
    margin: auto;
    width: 100%;
    max-width: 320px;
    animation: ilyesShakeX 2s infinite;
}


.ilyes-ec-description {
    text-align: center;
    font-weight: 600; /* semi-bold */
    margin-bottom: 15px;
}
