/*
==========================================================
Archivo: components.css

Descripción:
Componentes reutilizables de la aplicación.
==========================================================
*/


/* ==========================================================
   BOTONES
========================================================== */

.btn-primary,
.btn-secondary,
.btn-outline
{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .9rem 2rem;
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition-fast);
    cursor: pointer;
}

/* ==========================================================
   BOTÓN PRINCIPAL
========================================================== */
.btn-primary
{
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover
{
    background-color: var(--color-primary-hover);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* ==========================================================
   BOTÓN SECUNDARIO
========================================================== */
.btn-secondary
{
    background-color: var(--color-white);
    color: var(--color-text);
}

.btn-secondary:hover
{
    background-color: var(--color-background);
    transform: translateY(-2px);
}

/* ==========================================================
   BOTÓN OUTLINE
========================================================== */
.btn-outline
{
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

.btn-outline:hover
{
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* ==========================================================
   PRODUCT CARD
========================================================== */
.products-grid 
{ 
    display: grid; 
    grid-template-columns:
        repeat(auto-fill, minmax(250px, 300px));
    justify-content: center;
    gap: 2rem; 
} 

.product-card  
{  
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    background: white;  
    border-radius: var(--border-radius-lg);  
    overflow: hidden;  
    box-shadow: var(--shadow-sm);  
    transition: all .3s;  
}


.product-card:hover 
{ 
    transform: translateY(-8px); 
    box-shadow: var(--shadow-md); 
} 

.product-image 
{ 
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f5f5f5;
} 

.product-image img 
{ 
    width: 100%; 
    height: 100%; 
    display: block;
    object-fit: cover; 
    object-position: center;
    transition: transform .4s; 
} 

.product-card:hover .product-image img 
{ 
    transform: scale(1.05); 
} 

.product-body  
{  
    padding: 1.5rem;

    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-body .btn-primary
{
    margin-top: auto;
    align-self: flex-start;
}

.product-title 
{ 
    margin-bottom: .4rem; 
} 


.product-category 
{ 
    color: var(--color-text-light); 
    margin-bottom: 1rem; 
} 

.product-price 
{ 
    font-size: 1.4rem; 
    font-weight: var(--font-weight-bold); 
    margin-bottom: 1.5rem; 
}

/* ==========================================================
   PRODUCT OPTIONS
========================================================== */
.product-options
{
    margin: 2rem 0;
}

.product-options label
{
    display: block;
    margin-bottom: .75rem;
    font-weight: var(--font-weight-semibold);
}


/* ==========================================================
   COLOR OPTIONS
========================================================== */

.color-options
{
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: .75rem;
}

.color-circle
{
    width: 34px;
    height: 34px;
    border: 2px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all .2s;
}

.color-circle:hover
{
    transform: scale(1.08);
}

.color-circle.active
{
    border: 3px solid #222;
    transform: scale(1.15);
}

/* ==========================================================
   SIZE OPTIONS
========================================================== */
.size-options
{
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: .75rem;
}

.size-option
{
    padding: .6rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: var(--color-white);
    cursor: pointer;
    transition: all .2s;
}

.size-option:hover
{
    border-color: var(--color-primary);
}

.size-option.active
{
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* =========================================================
   DISEÑOS DE PRODUCTO
========================================================= */
.design-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.design-option {
    width: 110px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.design-option img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
    border-radius: 5px;
    margin-bottom: 6px;
}

.design-option span {
    display: block;
    font-size: 13px;
    text-align: center;
}

.design-option:hover {
    border-color: #999;
}

.design-option.active {
    border: 2px solid #c78b32;
}
/*
==========================================================
TOAST
==========================================================*/

.toast-message
{
    position:fixed;
    bottom:30px;
    right:30px;
    background:#222;
    color:white;
    padding:14px 22px;
    border-radius:10px;
    opacity:0;
    transform:translateY(20px);
    transition:.25s;
    z-index:5000;
}

.toast-message.show
{
    opacity:1;
    transform:translateY(0);
}

/* ==========================================================
   PRODUCT GALLERY
========================================================== */
.product-gallery
{
    width: 100%;
    max-width: 600px;
}


/* ==========================================================
   MAIN IMAGE
========================================================== */
.product-main-image
{
    width: 100%;
    height: 600px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
    background: #f7f7f7;
    border-radius: var(--border-radius-lg);
}

.product-main-image img
{
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}


/* ==========================================================
   THUMBNAILS
========================================================== */
.product-thumbnails
{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.product-thumbnail
{
    width: 85px;
    height: 85px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    background: #f5f5f5;
    transition:
        border-color .2s,
        transform .2s;
}

.product-thumbnail:hover
{
    border-color: var(--color-primary);
    transform: translateY(-2px);
}


/* ==========================================================
   RESPONSIVE GALLERY
========================================================== */

@media (max-width: 768px)
{
    .product-main-image
    {
        height: 420px;
    }

    .product-thumbnail
    {
        width: 70px;
        height: 70px;
    }
}