:root {
    --primary: #da012d;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
}

/*header*/
.main-header {
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}


.topbar {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 30px;
    background-color: black;

}

.nav-link {
    color: var(--primary);
    font-weight:600;
    font-size: 14px;
    text-transform: lowercase;

}

.dropdown-item {
    font-size: 14px;
}

.search-form {
    height: 40px;
}

.cart-icon {
    position: relative;
    font-size: 1.5rem;
    color: #333;
}

.cart-badge {
    position: relative;
    font-size: 0.75rem;
}

.user-icon {
    position: relative;
    font-size: 1.5rem;
    color: #333;
}

/*Categories*/
.product-card {
    border-radius: 4px;
    padding: 10px;
    align-items: center;
    width: 100%;
    color: var(--bs-dark);
    box-shadow: 0px 0px 1px rgba(0, 0, 0, .5);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.product-info {
    flex: 1;

}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/*producto*/
.producto-main h1 {
    font-weight: 300;
    font-size: 1.8rem;
}

.producto-main h2 {
    font-weight: 700;
    font-size: 1.5rem;
}

.badge-family {
    margin-right: 5px;
    font-weight: 300;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.form-select {
    font-size: 0.85rem;
}

.main-image {
    width: 100%;
    height: 450px;
    object-fit: contain;
    border-radius: 10px;
}

.thumbnail-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 5px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.thumbnail-img:hover,
.thumbnail-img.active {
    border-color: #007bff;
}

#prevBtn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: white;
    color: rgba(0, 0, 0, .8);
    border: none;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    padding: 0;
    cursor: pointer;
}

#nextBtn {
    position: absolute;
    right: 0;
    top: 50%;
    color: black;
    transform: translateY(-50%);
    z-index: 10;
    background-color: white;
    color: rgba(0, 0, 0, 0.8);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    padding: 0;
    cursor: pointer;
}

.variants-table th,
.variants-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
    font-size: 0.85rem;
}

.variants-table th {
    background-color: #f5f5f5;
}

.descripcion p {
    font-size: 0.85rem;
    color: rgba(0, 0, 0, .6);
}

/*login*/
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    width: 100%;
    padding: 10px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}


.error {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* view cart*/
table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f5f5f5;
}

.qty-input {
    width: 60px;
}

.fs-7 {
    font-size: 0.9rem;
}

.fs-8 {
    font-size: 0.7rem;
}

.fw-300 {
    font-weight: 300;
}

.semi-bold {
    font-weight: 600;
}


@media (max-width: 576px) {

    .topbar {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 60px;
        background-color: black;
    }

    .navbar .navbar-toggler {
        width: 3em;
    }

}

.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    width: 10%;
    text-align: center;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide .card {
    background-color: transparent;
    color: white;
    background-color: var(--primary);
    border: none;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
}

/* Side categoires */

.side-categories a{
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

/*Cart */
/* carrito compacto en sidebar */
.cart-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 80vh;
    overflow-y: scroll;
    
}

.cart-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    position: relative;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.85rem;
}

.cart-item-title {
    font-weight: 600;
    margin: 0;
    line-height: 1.1;
}

.cart-item-variant {
    font-style: italic;
    color: #6c757d;
    font-size: 10px;
}

.cart-item-price-qty {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 4px;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.cart-total {
    margin-top: 1rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
}

.small-btn {
    padding: 4px 8px;
    font-size: 0.65rem;
}

.sticky-filters {
    position: sticky;
    top: 20px;
}

.carrito-lateral {
    position: sticky;
    top: 20px;
}


.cover {
    object-fit: cover;
}

.box-shadow {
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
}

.categories-home {
    transition: .5s ease-in;
    border-radius: 0 20px;
}

.categories-home:hover {
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: .5s ease ease-out;
}

.border20 {
    border-radius: 0 20px;
}

.border2020 {
    border-radius: 0 20px 0 0;
}

.text-shadow {
    text-shadow: 5px 5px 15px rgba(0, 0, 0, .2);
}

.line-height {
    line-height: 90%;
}


/******************/
/***** Home ********/
/***********************/

.category-icon {
    filter: drop-shadow(5px 5px 5px rgba(0, 0, 0, 0.2));
    transition: .5s ease-out;
    cursor: pointer;
}

.category-icon:hover {
    filter: drop-shadow(5px 5px 5px rgba(0, 0, 0, 0.5));
    transition: .2s ease-in;
}



/*Categorias*/
.sentence-case {
    text-transform: lowercase;
    /* todo en minúscula */
}

.sentence-case::first-letter {
    text-transform: uppercase;
    /* solo la primera letra en mayúscula */
}

.cat-strips {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    /* espacio entre tiras */

}

.cat-strip {
    position: relative;
    height: 44px;
    border-radius: 12px;
    overflow: hidden;

}

.cat-strip .fill {
    position: absolute;
    inset: 0;
    /* gradiente “marca” que se estira hacia la derecha */
    background: linear-gradient(90deg,
            hsl(var(--h, 210) 80% 45%) 0%,
            hsl(calc(var(--h, 210) + 20) 85% 45%) 100%);
    transform-origin: left center;
    transform: scaleX(.6);
    /* arranca al 60% del ancho */
    transition: transform .25s ease;
}

.cat-strip:hover .fill,
.cat-strip:focus-within .fill,
.cat-strip.active .fill {
    transform: scaleX(1);
    /* se estira a todo el ancho */
}

.cat-link {
    position: relative;
    z-index: 1;
    display: block;
    padding: 10px 14px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    /* una línea */
    overflow: hidden;
    text-overflow: ellipsis;
    /* si es muy larga, “…” */
}

/* Accesibilidad: foco visible con teclado */
.cat-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .9);
    outline-offset: 2px;
    border-radius: 10px;
}


 .img-wrap {
     position: relative;
 }

 .shipping-badge {
     position: absolute;
     top: .5rem;
     left: 0;
     padding: .25rem .5rem;
     font-size: .75rem;
     line-height: 1;
     background: var(--primary);
     /* verde tipo Bootstrap success */
     color: #fff;
     border-radius: 0 .5rem 0 0;
     box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
     user-select: none;
     pointer-events: none;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: .02em;
     opacity: .95;
 }