/* ======== TIENDA CBTORCAL ======== */
/* ==== Imagen delantera ↔ trasera al hover ==== */
.product-image {
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    transition: opacity 0.3s ease;
}

.img-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.product-image:hover .img-hover {
    opacity: 1;
}

.product-image:hover .img-main {
    opacity: 0;
}
.card-img-swap {
    position: relative;
    width: 100%;
    height: 230px;
    overflow: hidden;
}

.card-img-swap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease-in-out;
}

/* Creamos un pseudo-elemento que usa la imagen trasera */
.card-img-swap::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

/* Al hacer hover, ocultamos la delantera y mostramos la trasera */
.card-img-swap:hover::after {
    opacity: 1;
}

.container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    font-family: 'Poppins', sans-serif;
    color: #222;
}

h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2em;
    font-weight: 600;
    color: #7b1fa2;
    position: relative;
}

h1::after {
    content: "";
    width: 80px;
    height: 4px;
    background: #f1b300;
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Grid de productos */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

/* Tarjeta del producto */
.card {
    background: #7b1fa2;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card-img-top {
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.card-text {
    font-size: 0.95em;
    color: #fff;
    margin-bottom: 15px;
    min-height: 40px;
}

.card-body p strong {
    color: #f1b300;
    font-size: 1.1em;
}

/* ======== SELECT (TALLAS) ======== */
.tale{
    display: block;
    font-weight: 500;
    color: #fff;
    font-size: 0.9em;
    margin-bottom: 15px;
}
label {
    display: block;
    font-weight: 500;
    color: #7b1fa2;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    background-color: #fafafa;
    color: #333;
    font-size: 0.95em;
    appearance: none;
    outline: none;
    transition: all 0.25s ease;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, #1c3666 50%), linear-gradient(135deg, #1c3666 50%, transparent 50%);
    background-position: calc(100% - 15px) calc(1em + 2px), calc(100% - 10px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.form-select:hover {
    border-color: #f1b300;
}

.form-select:focus {
    border-color: #1c3666;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(28, 54, 102, 0.15);
}

/* ======== BOTÓN ======== */
.btn {
    display: inline-block;
    color: #fff;
    background: #ffae42;
    text-decoration: none;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.15s ease;
    margin-top: 15px;
}

.btn:hover {
    background-color: #f1b300;
    color: #1c3666;
    transform: translateY(-2px);
}

.btn-size-guide {
    display: inline-block;
    margin-top: 10px;
    background-color: #444;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-size-guide:hover {
    background-color: #222;
}

/* Modal base */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 700px;
    border-radius: 10px;
    text-align: center;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: #333;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Varias imágenes dentro del modal */
.guide-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.size-guide-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}


/**Carrito**/
/* ===== Carrito superior ===== */
.cart-top {
    text-align: right;
    margin-bottom: 25px;
}

.cart-link {
    display: inline-block;
    background: #7b1fa2;
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: background 0.3s ease;
}

.cart-link:hover {
    background: #f1b300;
    color: #1c3666;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #f1b300;
    color: #1c3666;
    font-weight: bold;
    border-radius: 50%;
    padding: 3px 7px;
    font-size: 0.8em;
}




.alert {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
}

.alert-success {
    background: #e6ffe6;
    color: #2b662b;
}

.alert-danger {
    background: #ffe6e6;
    color: #662b2b;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.cart-table th, .cart-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.cart-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 10px;
    vertical-align: middle;
}

.cart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-footer .btn {
    margin: 0;
}


/**Formulario*/
.checkout-form {
    max-width: 500px;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkout-form label {
    font-weight: bold;
}

.checkout-form input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
}

.checkout-form .btn {
    background: #1c3666;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
}

.checkout-form .btn:hover {
    background: #f1b300;
    color: #1c3666;
}

