/* ========================================
   ESTILOS PARA CARRITO DE COMPRAS
   ======================================== */

.section-carrito {
    padding: 2rem 0 4rem;
    min-height: 70vh;
    background-color: #fff;
}

.container-cart {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.breadcrumb-nav {
    margin-bottom: 2rem;
}

.breadcrumb-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.breadcrumb-link {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-link:hover {
    color: #1E392A;
}

.breadcrumb-link i {
    font-size: 1rem;
}

.breadcrumb-separator {
    color: #ccc;
    font-size: 0.7rem;
}

.breadcrumb-current {
    color: #1E392A;
    font-weight: 500;
}

/* ========================================
   CART HEADER
   ======================================== */

.cart-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.cart-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1E392A;
    margin-bottom: 0.5rem;
}

.cart-subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.btn-checkout-top {
    display: inline-block;
    background-color: #1E392A;
    color: white;
    padding: 0.85rem 3rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #1E392A;
}

.btn-checkout-top:hover {
    background-color: #2ecc71;
    border-color: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

/* ========================================
   CART CONTENT
   ======================================== */

.cart-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

/* ========================================
   CART ITEMS
   ======================================== */

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 150px 1fr auto auto;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    transition: all 0.3s;
}

.cart-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Item Image */
.item-image {
    width: 150px;
    height: 150px;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    background-color: #f5f5f5;
}

/* Item Details */
.item-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}

.item-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1E392A;
    margin: 0;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.info-row i {
    font-size: 0.85rem;
    color: #888;
}

/* Item Controls */
.item-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.quantity-select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 100px;
}

.quantity-select:hover {
    border-color: #2ecc71;
}

.quantity-select:focus {
    outline: none;
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.unit-price {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Item Price */
.item-price {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1E392A;
}

.btn-remove {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: all 0.3s;
}

.btn-remove:hover {
    color: #a02e3a;
    text-decoration: none;
}

/* ========================================
   CART SUMMARY
   ======================================== */

.cart-summary {
    position: sticky;
    top: 20px;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.summary-label {
    color: #666;
}

.summary-value {
    font-weight: 600;
    color: #1E392A;
}

.summary-divider {
    border: none;
    border-top: 2px solid #dee2e6;
    margin: 1.5rem 0;
}

.summary-total {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.summary-total .summary-label {
    color: #1E392A;
}

.summary-total .summary-value {
    color: #1E392A;
}

.btn-checkout {
    display: block;
    width: 100%;
    background-color: #1E392A;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    border: 2px solid #1E392A;
}

.btn-checkout:hover {
    background-color: #2ecc71;
    border-color: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3);
    color: white;
}

/* ========================================
   EMPTY CART
   ======================================== */

.empty-cart {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-cart i {
    font-size: 5rem;
    color: #ccc;
    margin-bottom: 1.5rem;
}

.empty-cart h2 {
    font-size: 2rem;
    color: #1E392A;
    margin-bottom: 1rem;
}

.empty-cart p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.btn-shop {
    display: inline-block;
    background-color: #2ecc71;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-shop:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3);
    color: white;
}

/* ========================================
   ALERTS
   ======================================== */

.alert-custom-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: none;
    border-left: 4px solid #28a745;
    border-radius: 10px;
    color: #155724;
    margin-bottom: 2rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablets y dispositivos medianos */
@media (max-width: 991px) {
    .cart-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cart-summary {
        position: static;
    }

    .cart-item {
        grid-template-columns: 120px 1fr auto;
        gap: 1rem;
    }

    .item-price {
        grid-column: 3;
        grid-row: 1 / 3;
    }

    .item-controls {
        grid-column: 2;
        grid-row: 2;
        flex-direction: row;
        justify-content: flex-start;
        margin-top: 0.5rem;
    }
}

/* Móviles */
@media (max-width: 767px) {
    .container-cart {
        padding: 0 1rem;
    }

    .cart-title {
        font-size: 1.5rem;
    }

    .cart-subtitle {
        font-size: 0.9rem;
    }

    .btn-checkout-top {
        padding: 0.75rem 2rem;
        font-size: 0.95rem;
    }

    .cart-item {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .item-image {
        width: 100px;
        height: 100px;
    }

    .item-name {
        font-size: 1.1rem;
    }

    .info-row {
        font-size: 0.85rem;
    }

    .item-controls {
        grid-column: 1 / 3;
        grid-row: 2;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 0.5rem;
    }

    .quantity-select {
        min-width: auto;
        flex: 1;
    }

    .item-price {
        grid-column: 1 / 3;
        grid-row: 3;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid #eee;
    }

    .price {
        font-size: 1.25rem;
    }

    .cart-summary {
        padding: 1.5rem;
    }

    .summary-row {
        font-size: 0.95rem;
    }

    .summary-total {
        font-size: 1.25rem;
    }
}

/* Móviles pequeños */
@media (max-width: 575px) {
    .section-carrito {
        padding: 1.5rem 0 3rem;
    }

    .breadcrumb-container {
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .cart-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .cart-title {
        font-size: 1.25rem;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .item-image {
        width: 80px;
        height: 80px;
    }

    .item-name {
        font-size: 1rem;
    }

    .info-row {
        font-size: 0.8rem;
    }

    .info-row i {
        font-size: 0.75rem;
    }

    .item-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .price {
        font-size: 1.1rem;
    }

    .btn-remove {
        font-size: 0.85rem;
    }

    .cart-summary {
        padding: 1.25rem;
    }

    .summary-row {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .summary-total {
        font-size: 1.15rem;
    }

    .btn-checkout {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
}

/* Extra pequeños */
@media (max-width: 399px) {
    .cart-title {
        font-size: 1.1rem;
    }

    .btn-checkout-top {
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
    }

    .cart-item {
        padding: 0.5rem;
    }

    .item-name {
        font-size: 0.95rem;
    }

    .info-row {
        font-size: 0.75rem;
    }

    .quantity-select {
        padding: 0.4rem 1.5rem 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
}
