/* ======================= */
/* AJUSTES GENERALES       */
/* ======================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Comic Sans Rounded''Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #efefef;
    color: #000;
    scrollbar-width: none;
}

/* ======================= */
/* IMAGEN PRINCIPAL        */
/* ======================= */
.inicio {
    position: relative;
    width: 100%;
    height: 17vh; /* Ajuste base móvil */
    background-image: url("https://bkcrochet.es/wp-content/uploads/Imagen-principal.jpg");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #000;
}

.inicio-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    text-align: center;
}

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

header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 50px;
    background-color: #efefef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    box-shadow:0 0 10px rgba(0,0,0,0.15);
    z-index: 1000;
}

.menu-btn, .contact-btn {
    font-size: 28px;
    cursor: pointer;
}

.logo {
    height: 60px;
    width: auto;
    cursor: pointer;
}

/* ======================= */
/* MENÚ DESPLEGABLE        */
/* ======================= */
.menu {
    position: sticky;
    top: 50px;
    left: 0;
    width: 100%;
    background-color: #efefef;
    display: none;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    z-index: 999;
}

.menu a, .submenu-btn, .subsubmenu-btn {
    display: block;
    width: 100%;
    padding: 15px;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #e8e8e8;
    cursor: pointer;
}

.menu a:hover, .submenu-btn:hover, .subsubmenu-btn:hover {
    background-color: #f4f4f4;
}

.submenu, .subsubmenu {
    display: none;
    flex-direction: column;
}

.submenu { background-color: #ececec; }
.subsubmenu { background-color: #dcdcdc; }

.submenu a, .subsubmenu-btn { padding-left: 25px; }
.subsubmenu a { padding-left: 40px; }

/* ======================= */
/* FEATURES                */
/* ======================= */

.features {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 10px;
    padding: 0 1rem;
}

.feature-card {
    background: #efefef;
    color: #000;
    border-radius: 12px;
    box-shadow: 8px 8px 15px rgba(0,0,0,0.12),
                -3px -3px 10px rgba(255,255,255,0.6);
    aspect-ratio: 1 / 1;
    width: clamp(90px, 30vw, 160px);
    font-size: clamp(12px, 2.5vw, 18px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* ======================= */
/* NOVETATS                */
/* ======================= */
.novedades h2 {
    background-color: #ead7cb;
    padding: 20px;
}

.novedades img {
    max-width: 100%;
    width: 100vw;
    height: auto;
    display: block;
}

#novetats, #cataleg #origensbk{
    scroll-margin-top: 50px;
}

/* ======================= */
/* PRODUCT GRID            */
/* ======================= */
.cat {
    padding: 20px 0 0 20px;
    background-color: #efefef;
}

.product-grid h2 {
    width: 100%;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    padding: 20px;
}

.product-card {
    background: #efefef;
    border-radius: 15px;
    box-shadow: 6px 6px 14px rgba(0,0,0,0.15),
                -4px -4px 12px rgba(255,255,255,0.7);
    padding: 5px;
    text-align: center;
}

/* ======================= */
/* SWIPE MULTI-IMAGEN      */
/* ======================= */
.product-images {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

.product-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    scroll-snap-align: center;
    border-radius: 12px;
}

/* Oculta scroll */
.product-images::-webkit-scrollbar {
    display: none;
}


.img-botom{
	object-position: center bottom 65%;
}

.img-botomm{
	object-position: center bottom;
}

/* ======================= */
/* PRODUCT TEXT            */
/* ======================= */
.product-card p {
    font-size: 18px;
    font-weight: bold;
    margin-top: 1%;
    color: #000;
}


/* ======================= */
/* boton pedido            */
/* ======================= */
.btn-pedido {
	justify-content: center;
	background-color: #ead7cb;
	text-decoration: none;
	padding: 15px 35px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-pedido:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 14px rgba(0,0,0,0.25);
}

/* ======================= */
/* Origens Bk              */
/* ======================= */

.origensbk h2 {
    background-color: #efefef;
    
		padding: 50px 0px 10px 20px
}

.origensbk img {
    max-width: 100%;
    width: 100vw;
    height: auto;
    display: block;
}

/* ======================= */
/* FOOTER                  */
/* ======================= */
.footer {
    background: #79685d;
    padding: 25px 20px;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 -4px 15px #79685d;
}

.footer-title {
    font-size: 25px;
    font-weight: bold;
    margin-bottom: 15px;
    color: white;
}

.footer-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: center;
}

.footer-icon img {
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.footer-icon img:active {
    transform: scale(0.9);
}


/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .inicio {
        height: 50vh; /* menos altura que antes para no verse tan gigante */
        background-size: contain; /* evita que se recorte demasiado */
        background-position: top center;
    }
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .features { justify-content: space-around; }
}

/* Ordenador */
@media (min-width: 1025px) {
    .inicio {
        height: 60vh; /* altura moderada para escritorio */
        background-size: cover;
        background-position: center;
    }
    .product-grid { grid-template-columns: repeat(4, 1fr); }
    .features { justify-content: space-between; }
}




/* ======================= */
/* ANIMACIONES SCROLL      */
/* ======================= */

/* Feature cards: entran desde la izquierda */
.feature-card {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.feature-card.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Origens BK: entra desde abajo */
.origensbk img {
    opacity: 0;
    transform: translateY(80px);
    transition: opacity 1s ease, transform 1s ease;
}

.origensbk img.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Amago de deslizamiento para la primera imagen de cada product-images */
.product-images img:first-child {
    animation: slideHint 1s ease-in-out 2; /* 1s duración, repite 2 veces */
}

@keyframes slideHint {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-15%); } /* se desplaza ligeramente a la izquierda */
    50%  { transform: translateX(0); }    /* vuelve a su sitio */
    75%  { transform: translateX(-15%); } /* repite el movimiento */
    100% { transform: translateX(0); }    /* termina en su posición */
}


/* Rebote del botón de pedido */
.btn-pedido {
    display: inline-block;
    animation: bounceBtn 2s ease-in-out infinite;
}

@keyframes bounceBtn {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }  /* sube */
    60% { transform: translateY(-5px); }   /* rebote más pequeño */
}

