/* ================================
   Modern Cart Page Styling
   ================================ */

/* Cart container */
.cart.cart-form {
    max-width: 900px;
    margin: 50px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

/* Table */
.cart.cart-form table {
    width: 100%;
    border-collapse: collapse;
}

.cart.cart-form thead th {
    background: #f8f9fa;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    color: #444;
    border-bottom: 2px solid #eee;
}

/* Table rows */
.cart.cart-form tbody tr {
    border-bottom: 1px solid #eee;
}

.cart.cart-form tbody td {
    padding: 18px 14px;
    vertical-align: middle !important;
}

/* Product image */
.cart.cart-form td img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Remove Drupal’s default labels */
.cart.cart-form .field__label {
    display: none;
}

/* Product Title / Combined Item cell */
.cart.cart-form .views-field-purchased-entity {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Price & Total text */
.cart.cart-form .views-field-unit-price__number,
.cart.cart-form .views-field-total-price__number {
    font-weight: 700;
    font-size: 18px;
    color: #222;
}

/* Quantity Input */
.quantity-edit-input {
    width: 75px;
    padding: 10px;
    border: 1px solid #ddd !important;
    border-radius: 10px;
    font-size: 16px;
    text-align: center;
    transition: 0.2s ease;
}

.quantity-edit-input:focus {
    border-color: #ef6602 !important;
    box-shadow: 0 0 0 3px rgba(239,102,2,0.2);
}

/* Remove Button */
.delete-order-item {
    background: #ff4d4d !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    transition: 0.2s ease;
}

.delete-order-item:hover {
    background: #d93636 !important;
}

/* Totals Section */
#order-total-summary {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.order-total-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 17px;
}

.order-total-line__total {
    font-weight: 800;
    font-size: 20px;
}

/* Buttons */
#edit-actions {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

#edit-actions input[type="submit"] {
    padding: 14px 28px !important;
    border-radius: 12px !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    border: none !important;
    transition: background 0.3s ease, transform 0.2s ease;
    background-color: #e65a00;
}

/* Checkout Button */
#edit-checkout {
    background: #ef6602 !important;
    color: #fff !important;
}

#edit-checkout:hover {
    background: #d45900 !important;
    transform: translateY(-2px);
}

/* ===========================
   RESPONSIVE STYLING
   =========================== */

@media (max-width: 768px) {

    .cart.cart-form table,
    .cart.cart-form thead {
        display: none; /* hide desktop table */
    }

    /* Convert items into cards */
    .cart.cart-form tbody {
        display: flex;
        flex-direction: column;
        gap: 25px;
    }

    .cart.cart-form tbody tr {
        display: flex;
        flex-direction: column;
        padding: 20px;
        border: 1px solid #eee;
        border-radius: 14px;
        background: #fafafa;
    }

    .views-field-purchased-entity {
        flex-direction: column;
        text-align: center;
    }

    .views-field-unit-price__number,
    .views-field-total-price__number,
    .views-field-edit-quantity,
    .views-field-remove-button {
        text-align: center;
    }

    #edit-actions {
        flex-direction: column;
    }
}


/* -------------------------------
   MAIN CHECKOUT LAYOUT
--------------------------------*/
.layout-checkout-form {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
    background: #f5f6f8;
    padding: 20px;
    border-radius: 16px;
}

/* Left Section: Shipping Info */
.layout-region-checkout-main {
    flex: 2;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Right Section: Order Summary */
.layout-region-checkout-secondary {
    flex: 1.2;
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.layout-region-checkout-secondary h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #222;
}

/* -------------------------------
   CHECKOUT PANES (Sections)
--------------------------------*/
.checkout-pane {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 5px 18px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

/* Fieldset legend styling */
.checkout-pane fieldset {
    border: none;
    padding: 0;
}

.checkout-pane legend span {
    font-size: 18px;
    font-weight: 600;
    color: #111;
}

/* -------------------------------
   SELECT DROPDOWNS
--------------------------------*/
.form-select,
.form-control {
    border-radius: 12px !important;
    padding: 10px 14px !important;
    border: 1px solid #ccc;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-select:focus,
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.15);
}

/* -------------------------------
   ADDRESS BOX
--------------------------------*/
.profile--view-mode--full {
    background: #f9fafb;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid #ff6b00;
    margin-top: 12px;
}

.profile--view-mode--full p.address {
    margin: 0;
    line-height: 1.5;
    font-size: 15px;
    color: #444;
    background: #fff2e6; /* light orange background */
    padding: 10px 12px; /* add some padding for better spacing */
    border-radius: 10px; /* rounded corners for nicer look */
}


.address-book-edit-button {
    margin-top: 12px;
}

/* -------------------------------
   SHIPPING METHOD - RADIO CARDS
--------------------------------*/
.form-radios .form-check {
    background: #f9fafb;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid #e2e2e2;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.form-radios .form-check:hover,
.form-radios .form-check:focus-within {
    border-color: #007bff;
    background: #eef6ff;
}

.form-check-input {
    transform: scale(1.3);
    margin-right: 12px !important;
}

.form-check-label.option {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.description {
    font-size: 13px;
    color: #666;
    margin-left: 32px;
    margin-top: 4px;
}

/* -------------------------------
   SHIPPING METHOD - RADIO CARDS
--------------------------------*/
.form-radios .form-check {
    background: #fff7f0; /* light orange background */
    padding: 14px 18px;
    border-radius: 12px;
    border: 2px solid #ff6b00; /* orange border */
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.form-radios .form-check:hover,
.form-radios .form-check:focus-within {
    border-color: #e65a00; /* darker orange on hover/focus */
    background: #fff2e6; /* lighter orange hover background */
}

/* Radio input */
.form-check-input {
    accent-color: #ff6b00; /* changes radio button color to orange */
    transform: scale(1.3);
    margin-right: 12px !important;
    cursor: pointer;
}

.form-check-label.option {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.description {
    font-size: 13px;
    color: #666;
    margin-left: 32px;
    margin-top: 4px;
}

.layout-checkout-form .btn-primary{
  background-attachment: #e65a00 !important;
  color: #fff;
}


.continue-shopping .button:hover,
.continue-shopping .button {
    background-color: #e65a00; /* base color */
    color: #fff;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease; /* smooth transition */
}


/* -------------------------------
   PREVIOUS LINK BUTTON
--------------------------------*/
.link--previous {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* space between icon and text if any */
    padding: 10px 18px;
    border-radius: 12px;
    background: #fff7f0; /* light orange background */
    border: 2px solid #ff6b00; /* orange border */
    color: #ff6b00; /* orange text */
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.link--previous:hover {
    background: #ff6b00; /* orange background on hover */
    color: #fff; /* white text on hover */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.link--previous:active {
    background: #e65a00; /* darker orange on click */
    border-color: #e65a00;
    color: #fff;
}

.continue-shopping {
  margin-top: 20px;
}
.continue-shopping a {
  padding: 10px 20px;
  font-size: 16px;
}

