/* Cart & Checkout Shared Styles */

.cart-container {
  max-width: 1200px;
  margin: 40px auto 60px;
  padding: 0 20px;
}

/* --- Progress Bar --- */
.step-indicator-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto 30px auto;
    position: relative;
    padding: 0 20px;
}

.step-indicator-line {
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 1px;
    background-color: #ddd;
    z-index: 1;
}

.step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    cursor: pointer;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fcfcfb;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--f-title, serif);
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.step-item.active .step-circle {
    background-color: var(--c-green-dark, #5c6622);
    border-color: var(--c-green-dark, #5c6622);
    color: #fff;
}

.step-label {
    font-family: var(--f-title, serif);
    font-size: 0.95rem;
    color: #888;
    transition: color 0.3s ease;
}

.step-item.active .step-label {
    color: var(--c-green-dark, #5c6622);
    font-weight: 500;
}

/* --- Layout --- */
.checkout-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  align-items: start;
}

/* --- White Card Containers --- */
.white-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 35px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  border: 1px solid #f0f0f0;
}

.card-title {
  font-family: var(--f-title, serif);
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: 400;
}

.card-title i {
    font-size: 1.2rem;
    color: #888;
    background: #fdfdfc;
    padding: 10px;
    border-radius: 50%;
    border: 1px solid #eee;
}

/* --- Cart Items List --- */
.cart-items-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-items-table th {
    text-align: left;
    font-family: var(--f-body, sans-serif);
    font-size: 0.85rem;
    color: #888;
    font-weight: 400;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cart-items-table th:not(:first-child) {
    text-align: center;
}

.cart-item-row {
    border-bottom: 1px solid #f9f9f9;
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-row td {
    padding: 20px 0;
    vertical-align: middle;
}

.cart-item-info-col {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
}

.cart-item-title {
  font-family: var(--f-title, serif);
  font-size: 1rem;
  color: var(--c-green-dark, #5c6622);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-item-subtitle {
  font-family: var(--f-body, sans-serif);
  font-size: 0.85rem;
  color: #666;
}

.cart-item-price-col, .cart-item-subtotal-col {
    text-align: center;
    font-family: var(--f-body, sans-serif);
    font-size: 0.95rem;
    color: #333;
}

.cart-item-subtotal-col {
    font-weight: 600;
}

.cart-qty-wrapper {
    display: flex;
    justify-content: center;
}

.cart-qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid #eee;
  border-radius: 20px;
  padding: 4px 8px;
  background: #fff;
}

.cart-qty-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 10px;
  color: var(--c-green-dark, #5c6622);
  font-weight: 300;
}

.cart-qty-input {
  width: 25px;
  text-align: center;
  border: none;
  background: transparent;
  font-family: var(--f-body, sans-serif);
  font-size: 0.9rem;
  color: #333;
  font-weight: 500;
}

.cart-qty-input:focus { outline: none; }

.btn-remove {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
}

.btn-remove:hover { color: #d9534f; }

/* --- Cart Bottom Actions --- */
.cart-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.coupon-section {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fcfcfc;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.coupon-section span {
    font-family: var(--f-body, sans-serif);
    font-size: 0.9rem;
    color: #555;
}

.coupon-input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    outline: none;
}

.coupon-input:focus { border-color: var(--c-green-dark, #5c6622); }

.btn-apply {
    background: transparent;
    border: 1px solid var(--c-green-dark, #5c6622);
    color: var(--c-green-dark, #5c6622);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-apply:hover {
    background: var(--c-green-dark, #5c6622);
    color: #fff;
}

.items-count {
    font-family: var(--f-body, sans-serif);
    font-size: 0.95rem;
    color: #555;
}

.items-count strong {
    font-size: 1.1rem;
    color: #333;
    margin-left: 5px;
}

/* --- Main Action Buttons --- */
.action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn-outline, .btn-solid {
    padding: 15px 30px;
    border-radius: 30px;
    font-family: var(--f-body, sans-serif);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-outline {
    background: transparent;
    border: 1px solid #ccc;
    color: #555;
}

.btn-outline:hover {
    border-color: #888;
    color: #333;
}

.btn-solid {
    background: var(--c-green-dark, #5c6622);
    border: 1px solid var(--c-green-dark, #5c6622);
    color: #fff;
    min-width: 200px;
}

.btn-solid:hover {
    background: #4a521b;
    border-color: #4a521b;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-solid:disabled {
    background: #a5a98d;
    border-color: #a5a98d;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- Order Summary (Right Column) --- */
.summary-card {
  position: sticky;
  top: 100px;
}

.summary-products-list {
    margin-bottom: 25px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.summary-item-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.summary-item-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
}

.summary-item-title {
    font-family: var(--f-title, serif);
    font-size: 0.85rem;
    color: #333;
    text-transform: uppercase;
}

.summary-item-qty {
    font-family: var(--f-body, sans-serif);
    font-size: 0.8rem;
    color: #888;
    margin-top: 3px;
}

.summary-item-price {
    font-family: var(--f-body, sans-serif);
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
}

.summary-divider {
  height: 1px;
  background: #eee;
  margin: 20px 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-family: var(--f-body, sans-serif);
  color: #555;
  font-size: 0.95rem;
}

.total-box {
    background: #f5f4eb;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-box span {
    font-family: var(--f-title, serif);
    font-size: 1.1rem;
    color: var(--c-green-dark, #5c6622);
    font-weight: 500;
}

.total-box .total-amount {
    font-size: 1.3rem;
    font-weight: 600;
}

.secure-checkout-badge {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: #888;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: #fdfdfc;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #eee;
}


/* --- Form Elements (Identification & Delivery) --- */
.checkout-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.form-group-modern {
    display: flex;
    flex-direction: column;
}

.form-group-modern label {
    font-family: var(--f-body, sans-serif);
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--c-green-dark, #5c6622);
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.input-modern {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--f-body, sans-serif);
    font-size: 0.95rem;
    transition: border-color 0.3s;
    background: #fdfdfc;
    width: 100%;
}

.input-modern:focus {
    border-color: var(--c-green-dark, #5c6622);
    outline: none;
    background: #fff;
}

.input-group-modern {
    display: flex;
}

.input-group-modern select {
    width: 80px;
    border-radius: 4px 0 0 4px;
    border-right: none;
    background: #f5f5f5;
}

.input-group-modern input {
    flex-grow: 1;
    border-radius: 0 4px 4px 0;
}

/* Accordion overrides for steps */
.step-accordion {
    border-top: 1px solid #eee;
    margin-top: 30px;
    padding-top: 20px;
}

.step-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: var(--f-title, serif);
    font-size: 1.2rem;
    color: #888;
}

.step-accordion-header:hover {
    color: var(--c-green-dark, #5c6622);
}

.cart-empty-msg {
  text-align: center;
  padding: 40px;
  color: #888;
  font-family: var(--f-body);
}

/* Responsive */
@media (max-width: 992px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  .summary-card {
    position: static;
  }
}

@media (max-width: 768px) {
    .step-indicator-container {
        padding: 0 10px;
    }
    .step-indicator-line {
        left: 20px; right: 20px;
    }
    .step-label {
        font-size: 0.8rem;
    }
    .cart-items-table thead {
        display: none;
    }
    .cart-items-table {
        display: block;
        width: 100%;
    }
    .cart-item-row {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        position: relative;
        padding-bottom: 45px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 15px;
    }
    .cart-item-row td {
        display: block;
        width: 100%;
        padding: 5px 0;
        text-align: left;
        border-bottom: none;
    }
    /* 3er td: Cantidad */
    .cart-item-row td:nth-child(3) {
        width: 50%;
        display: flex;
        align-items: center;
    }
    .cart-qty-wrapper {
        justify-content: flex-start;
        margin-top: 0;
    }
    /* 4to td: Subtotal */
    .cart-item-row td.cart-item-subtotal-col {
        width: 50%;
        text-align: right;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
        margin-top: 0;
    }
    .cart-item-price-col {
        text-align: left;
        margin-top: 0;
    }
    .btn-remove {
        position: absolute;
        bottom: 5px;
        left: 0;
        width: auto;
        margin-top: 0;
        color: #d9534f;
    }
    .cart-bottom-bar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    .action-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .btn-solid, .btn-outline {
        width: 100%;
    }
}

/* Confirm Order Modal Data Box */
.confirm-data-box {
    background: #fdfdfc;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: left;
}

.confirm-data-box .data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f5f5f5;
    font-family: var(--f-body, sans-serif);
}

.confirm-data-box .data-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.confirm-data-box .data-label {
    color: #888;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.confirm-data-box .data-value {
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.confirm-data-box .total-row {
    margin-top: 5px;
    padding-top: 15px;
    border-top: 2px dashed #ddd;
}

.confirm-data-box .total-row .data-label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.confirm-data-box .total-row .data-value.highlight {
    color: var(--c-green-dark, #5c6622);
    font-size: 1.1rem;
    font-weight: 700;
}
