@import '../common.css';

/* ============================================
   RED GALLERY THEME - "Blood Moon"
   ============================================ */

body.gallery-page-body {
    background-color: #590f19;
    background-image: linear-gradient(180deg,
            #590f19 0%,
            #36080d 100%),
        url('../../assets/concrete-wall-texture.jpg');
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-blend-mode: multiply;
    color: #ffffff;

    /* Override scrollbar to black for gallery */
    --scrollbar-thumb: rgba(0, 0, 0, 0.6);
    --scrollbar-thumb-hover: rgba(0, 0, 0, 0.85);
    scrollbar-color: rgba(0, 0, 0, 0.6) transparent;
}

/* Gallery scrollbar overrides */
body.gallery-page-body ::-webkit-scrollbar {
    width: 5px;
}

body.gallery-page-body ::-webkit-scrollbar-track {
    background: transparent;
}

body.gallery-page-body ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
}

body.gallery-page-body ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* Force Navbar Visible & Styling for Red Background */
body.gallery-page-body .main-navbar {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    background: rgba(0, 0, 0, 0.4) !important;
    -webkit-backdrop-filter: blur(var(--navbar-blur, 4px));
    backdrop-filter: blur(var(--navbar-blur, 4px));
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

body.gallery-page-body footer {
    background: #0a0a0a;
    border-top: 1px solid rgba(0, 0, 0, 0.3);
}

/* ============================================
   HERO SECTION
   ============================================ */

.gallery-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #2a050a;
    background-image:
        linear-gradient(to bottom, rgba(42, 5, 10, 0.7) 0%, rgba(0, 0, 0, 0.85) 100%),
        url('../../assets/FONDO 2.jpg');
    background-position: center;
    background-size: cover;
    padding-top: 70px;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    margin-top: 0;
    overflow: hidden;
}

/* Breadcrumbs inside hero: position at top, remove default margin */
.gallery-hero .breadcrumbs {
    margin-top: 0 !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4;
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 2rem;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.hero-pre {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: rgba(255, 255, 255, 0.8);
}

.hero-main {
    font-family: 'Excellent Display', sans-serif !important;
    font-size: clamp(3.5rem, 12vw, 7rem);
    line-height: 1;
    letter-spacing: 2px;
    font-weight: bold;
    background: linear-gradient(180deg, #ffffff 30%, rgba(255, 255, 255, 0.45) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 30px rgba(0, 0, 0, 0.5));
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.4rem;
    text-transform: uppercase;
    margin-top: 1.5rem;
}

/* Ornament for Gallery (Black) */
.hero-ornament {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
    /* Matched with Tattoo page */
}

.hero-ornament svg {
    width: 160px;
    /* Matched with Tattoo page */
    height: 16px;
    color: #000000;
    /* Black as requested */
    opacity: 0.8;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    font-size: 0.7rem;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    animation: float 2s ease-in-out infinite;
    opacity: 0.8;
}

.hero-scroll-hint svg {
    stroke: #ffffff;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@media screen and (max-width: 600px) {
    .gallery-hero {
        min-height: 50vh;
        min-height: 50dvh;
    }
}

/* ============================================
   GALLERY GRID
   ============================================ */

.gallery-content {
    padding: 4rem 0 8rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    align-items: start;
    /* Prevents stretching */
}

.gallery-card {
    background-color: #050505;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.gallery-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Expanded State */
.gallery-card.is-expanded {
    grid-row: span 2;
    /* Occupy more space if grid allows, though JS/Masonry might be better for this, simple flex works for now */
    border-color: #8b0000;
    /* Dark Red border when active */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    z-index: 10;
}

/* HEADER SECTION (Always visible) */
.gallery-card__header {
    cursor: pointer;
    position: relative;
    /* Determine clickable area */
}

.gallery-card__image {
    position: relative;
    aspect-ratio: 4/3;
    /* Slightly shorter than square */
    overflow: hidden;
    background-color: #111;
}

.gallery-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.9;
}

.gallery-card:hover .gallery-card__image img {
    transform: scale(1.05);
    opacity: 1;
}

/* Info Summary */
.gallery-card__info {
    padding: 1.5rem;
    background: linear-gradient(to top, #000000, #0a0a0a);
    position: relative;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.gallery-card__title {
    font-family: var(--font-heading);
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.gallery-card__meta {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Toggle Arrow */
.gallery-card__toggle {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: none;
}

.gallery-card__toggle:hover {
    opacity: 1;
}

.gallery-card.is-expanded .gallery-card__toggle {
    transform: translateY(-50%) rotate(180deg);
    color: #ffeb3b;
    /* Highlight when open */
}

/* ============================================
   EXPANDABLE DETAILS (Accordion Style)
   ============================================ */

.gallery-card__details {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery-card.is-expanded .gallery-card__details {
    grid-template-rows: 1fr;
    border-top-color: rgba(255, 255, 255, 0.2);
}

.details-content {
    overflow: hidden;
    padding: 0 1.5rem;
    /* Horizontal padding only initially */
    opacity: 0;
    transition: opacity 0.4s ease, padding 0.4s ease;
}

.gallery-card.is-expanded .details-content {
    padding: 1.5rem;
    /* Full padding when open */
    opacity: 1;
    transition-delay: 0.1s;
    /* Slight delay for content fade in */
}

/* Inner Detail Styling */
.details-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.details-ornament {
    margin: 1rem 0 1.5rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
}

.details-ornament svg {
    height: 6px;
    width: 60px;
}

/* Options Grid */
.details-options {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #666;
    letter-spacing: 1.5px;
}

/* Select Styling */
.format-select {
    width: 100%;
    padding: 0.75rem;
    background-color: #111;
    border: 1px solid #333;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.format-select:focus {
    outline: none;
    border-color: #666;
}

/* Color Options */
.color-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.active {
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* Swatch Colors */
.color-swatch--black {
    background-color: #1a1a1a;
}

.color-swatch--white {
    background-color: #f5f5f5;
}

.color-swatch--bone {
    background-color: #d4c4a8;
}

.color-swatch--crimson {
    background-color: #8b0000;
}

.color-swatch--gold {
    background: linear-gradient(135deg, #b8860b, #ffd700);
}

.color-swatch--silver {
    background: linear-gradient(135deg, #71706e, #c0c0c0);
}

/* Specs Footer */
.details-footer {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.details-specs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.9rem;
}

.spec-label {
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.spec-value {
    color: white;
    font-weight: 500;
}

.price-display {
    font-size: 1.25rem;
    font-weight: bold;
    color: #ffeb3b;
    /* Gold/Yellow for price */
}

/* Buy Button */
.btn-buy {
    background: white;
    color: black;
    text-align: center;
    padding: 1rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    display: block;
}

.btn-buy:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* Animation for Price Update */
@keyframes flashText {
    0% {
        color: #ffeb3b;
    }

    50% {
        color: #fff;
        text-shadow: 0 0 10px #ffeb3b;
    }

    100% {
        color: #ffeb3b;
    }
}

.price-updated {
    animation: flashText 0.3s ease;
}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             