@font-face {
    font-family: 'Volkswagen Serial';
    src: url('CheGuevaraBarry-Brown.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: 'Volkswagen Serial', Arial, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
}

/* Page Transitions */
html { height: 100%; }
body { opacity: 0; }
body.page-fade-in:not([data-transition]),
body.page-fade-in[data-transition="fade"] { opacity: 1; transition: opacity 250ms ease; }
body.page-exit:not([data-transition]),
body.page-exit[data-transition="fade"] { opacity: 0; transition: opacity 200ms ease; }
body[data-transition="slide"] { transform: translateY(10px); }
body.page-fade-in[data-transition="slide"] { opacity: 1; transform: translateY(0); transition: transform 300ms ease, opacity 300ms ease; }
body.page-exit[data-transition="slide"] { opacity: 0; transform: translateY(10px); transition: transform 250ms ease, opacity 250ms ease; }

@media (prefers-reduced-motion: reduce) {
    body { opacity: 1 !important; transform: none !important; }
}

/* Floating logo overlay for transitions */
.logo-transition {
    position: fixed;
    z-index: 100000;
    pointer-events: none;
    transition: left 350ms ease, top 350ms ease, width 350ms ease, height 350ms ease, opacity 350ms ease;
}

.logo-transition img {
    display: block;
    width: 100%;
    height: 100%;
}

/* Footer */
.site-footer {
    border-top: 1px solid #ddd;
    background: #fff;
}

.site-footer .footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.footer-left,
.footer-right {
    font-family: 'Volkswagen Serial', Arial, sans-serif;
    letter-spacing: 1px;
}

.footer-left {
    text-align: left;
}

.footer-right {
    text-align: right;
    font-weight: bold;
}

.footer-link {
    color: inherit;
    text-decoration: underline;
}

/* Footer nav links */
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    text-transform: uppercase;
}
.footer-links .footer-link { text-decoration: none; }

.newsletter-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.newsletter-input {
    width: 260px;
    padding: 12px 14px;
    border: 2px solid #000;
    border-radius: 999px;
    font-family: 'Volkswagen Serial', Arial, sans-serif;
    font-size: 1rem;
    outline: none;
    background: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.newsletter-input:hover,
.newsletter-input:focus {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.newsletter-button {
    padding: 12px 18px;
    border: 2px solid #000;
    background: #fff;
    color: #000;
    border-radius: 999px;
    cursor: pointer;
    font-family: 'Volkswagen Serial', Arial, sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, color 0.2s ease;
}

.newsletter-button:hover {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

@media (max-width: 968px) {
    .site-footer .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
        padding: 25px 20px;
    }
    .footer-left, .footer-right { text-align: center; }
    .newsletter-form { justify-content: center; flex-wrap: wrap; }
    .newsletter-input { width: 100%; max-width: 380px; }
}

/* Header */
header {
    padding: 20px 40px;
    border-bottom: 2px solid; /* subtle separator line */
    background: #fff;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 2.5rem;
    font-weight: normal;
    letter-spacing: 2px;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.logo-image {
    display: block;
    max-height: 128px;
    width: auto;
    transition: transform 180ms ease, filter 180ms ease;
}

.logo-link:hover .logo-image { transform: translateY(-2px) scale(1.04); }
.logo-link:active .logo-image { transform: translateY(0) scale(0.98); }

.header-right {
    display: flex;
    gap: 30px;
    align-items: center;
    position: absolute;
    right: 0;
}

.visual-btn,
.cart-btn {
    background: none;
    border: none;
    font-family: 'Volkswagen Serial', Arial, sans-serif;
    font-size: 1.2rem;
    cursor: pointer;
    letter-spacing: 1px;
}

.cart-btn { text-decoration: none; color: inherit; font-size: 1.6rem; }

@media (min-width: 1024px) {
  .cart-btn { font-size: 1.9rem; }
}

.visual-btn:hover,
.cart-btn:hover {
    opacity: 0.7;
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
}

#products-container {
    display: grid;
    /* Fixed-width cards, auto-fit rows; center the row when few items */
    grid-template-columns: repeat(auto-fit, minmax(250px, 250px));
    gap: 40px;
    justify-content: center;
}

/* Make product cards larger on desktop */
@media (min-width: 1024px) {
  #products-container {
    grid-template-columns: repeat(auto-fit, minmax(380px, 380px));
    gap: 56px;
  }
}

/* Extra-large screens: even bigger cards */
@media (min-width: 1440px) {
  #products-container {
    grid-template-columns: repeat(auto-fit, minmax(420px, 420px));
    gap: 64px;
  }
}

/* Product Cards */
.product-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    padding: 15px;
    margin: -15px;
    border: 2px dashed transparent;
    border-radius: 12px;
}

.product-card:hover {
    border-color: #000000;
}

.product-image-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 12px;
    border: 2px solid #000; /* subtle black outline */
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease, transform 0.4s ease;
    border-radius: inherit;
}

.product-image .main-image {
    opacity: 1;
}

.product-image .hover-image {
    opacity: 0;
}

.product-card:hover .product-image .main-image {
    opacity: 0;
}

.product-card:hover .product-image .hover-image {
    opacity: 1;
}

.product-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-title {
    font-size: 1.2rem;
    font-weight: normal;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.product-price {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.price {
    font-weight: normal;
}

.compare-price {
    text-decoration: line-through;
    opacity: 0.5;
    font-size: 1.1rem;
}

.sale-badge {
    display: inline-block;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: #ff0000;
    margin-top: 10px;
}

.sold-out-badge {
    display: inline-block;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: #999999;
    margin-top: 10px;
}

/* Loading and Error States */
.loading,
.error {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
}

.error {
    color: #ff0000;
}

/* Responsive Design */
@media (max-width: 1200px) {
    /* auto-fit already adapts column count; keep spacing pleasant */
    #products-container { gap: 36px; }
}

@media (max-width: 968px) {
    #products-container { gap: 30px; }

    .product-title {
        font-size: 1rem;
    }

    header {
        padding: 15px 20px;
    }

    main {
        padding: 40px 20px;
    }
}

@media (max-width: 600px) {
    /* Single column naturally via auto-fit; no override needed */
    #products-container { gap: 24px; }
}

/* --- Product Card Hover Effects: lift, shadow, image zoom --- */
.product-card { will-change: transform, box-shadow; }
.product-card:hover,
.product-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    outline: none;
}

.product-card:hover .product-image img,
.product-card:focus-visible .product-image img { transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
    .product-card,
    .product-card:hover,
    .product-card:focus-visible { transition: none !important; transform: none !important; box-shadow: none !important; }
    .product-card .product-image img { transition: opacity 0.2s linear !important; }
}

.footer-center { text-align: center; }
