body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    overflow-x: hidden;
}

/* HEADER */
header {
    position: relative;
    color: #fff;
    padding: 60px 20px;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
}

header * {
    position: relative;
    z-index: 1;
}

.home-header {
    background-image: url('images/HOMEcover.jpg');
    min-height: 400px;
}

.bracelets-header {
    background-image: url('images/BRCcover.jpg');
}

.prints-header {
    background-image: url('images/PRTcover.jpg');
}

/* LANGUAGE BUTTON */
.lang-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 12px;
    background: #fff;
    color: #000;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    border: none;
    transition: 0.2s ease;
}

.lang-btn:hover {
    transform: scale(1.05);
}

/* HERO */
.hero {
    text-align: center;
    padding: 60px 20px;
}

/* CONTAINER */
.container {
    max-width: 1000px;
    margin: auto;
    padding: 20px;
}

/* GRID */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
}

@media (min-width: 600px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* CARD */
.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;

    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.5s ease forwards;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* IMAGE */
.card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: #fff;
}

/* IMAGE HOVER */
.img-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.img-wrapper img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.img-main {
    opacity: 1;
}

.img-hover {
    opacity: 0;
}

.card:hover .img-main {
    opacity: 0;
}

.card:hover .img-hover {
    opacity: 1;
}

/* NAVIGATION */
nav {
    margin-top: 20px;
}

nav a {
    color: white;
    margin: 0 10px;
    text-decoration: none;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 14px;
    border-radius: 8px;
    display: inline-block;
    transition: background 0.2s ease;
}

nav a:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* CARD CONTENT */
.card-content {
    padding: 15px;
}

.card-content h3 {
    margin-top: 0;
    font-size: 16px;
}

.card-content p {
    font-size: 14px;
}

/* BUTTON */
.button {
    display: inline-block;
    padding: 10px 15px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 14px;
    transition: background 0.2s ease;
}

.button:hover {
    background: #333;
}

/* TRUST SECTION */
.trust {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    padding: 30px 20px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.trust-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
}

.trust-item span {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 20px;
}

.modal-content {
    position: relative;
    background: white;
    padding: 20px;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.modal-content img {
    width: 100%;
    height: 250px;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
}

/* FOOTER */
footer {
    background: #111;
    color: #ccc;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 14px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

footer p {
    margin: 5px 0;
}

footer a {
    color: #ccc;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* BACK TO TOP BUTTON */
#topBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;

    width: 45px;
    height: 45px;

    border: none;
    border-radius: 50%;

    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);

    color: white;
    font-size: 20px;
    cursor: pointer;

    display: none;

    z-index: 999;

    transition: opacity 0.3s ease, transform 0.2s ease;
}

#topBtn:hover {
    transform: scale(1.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
}

/* =========================
   SAFE LAYOUT FIXES
========================= */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* CARD SAFETY */
.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* IMAGE SAFETY (NO BREAKING) */
.img-wrapper {
    position: relative;
    width: 100%;
    height: 260px;
    background: #f3f3f3;
}

.img-wrapper img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

/* HOVER SWAP SAFE */
.img-hover {
    opacity: 0;
}

.card:hover .img-hover {
    opacity: 1;
}

.card:hover .img-main {
    opacity: 0;
}

/* BUTTON SAFE RESET */
.button {
    display: inline-block;
    padding: 10px 14px;
    background: #111;
    color: white;
    text-decoration: none;
    border-radius: 8px;
}

/* MODAL SAFETY */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    max-width: 420px;
    width: 90%;
}

/* MOBILE SAFE */

@media (max-width: 768px) {

    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px;
    }

    .card {
        width: 100%;
    }
}

@media (max-width: 768px) {

    .modal-content {
        width: 92%;
        max-height: 90vh;
        overflow-y: auto;
        padding: 18px;
        border-radius: 16px;
    }

    .modal img {
        max-height: 300px;
        object-fit: cover;
    }
}

@media (max-width: 768px) {

    .hero h2 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {

    header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    nav {
        display: flex;
        gap: 14px;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (hover: hover) {

    .card:hover {
        transform: translateY(-4px);
    }
}

html {
    scroll-behavior: smooth;
}

.price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-weight: 600;
}

.eur-price {
    font-size: 0.85rem;
    opacity: 0.7;
}

.lang-btn b {
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* ================= CART DRAWER ================= */

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
    z-index: 999;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
    transition: 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.cart-header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.cart-content {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

/* Floating cart button */
.cart-fab {
    position: fixed;
    top: 20px;
    right: 20px;
    background: black;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 30px;
    cursor: pointer;
    z-index: 998;
}