/* In-Stock Detail Page Styles */

/* Image lightbox/modal styles */
#image-modal {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

#image-modal img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    padding: 1rem;
}

/* Responsive modal adjustments */
@media (max-width: 640px) {
    #image-modal img {
        max-width: 95vw;
        max-height: 85vh;
        padding: 0.5rem;
    }
    
    #close-image-modal {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    #close-image-modal svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Image thumbnails: size + hover + active state */
.additional-image-thumb {
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    height: 80px;
    object-fit: cover;
}

@media (min-width: 640px) {
    .additional-image-thumb {
        height: 90px;
    }
}

@media (min-width: 1024px) {
    .additional-image-thumb {
        height: 110px;
    }
}

.additional-image-thumb:hover {
    transform: scale(1.03);
}

.additional-image-thumb--active {
    border-color: #d4af37 !important; /* Premium gold */
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.6);
}

/* Main image - clickable for lightbox, no hover effect */
.slab-main-image {
    cursor: pointer;
}

/* WCAG 2.2.1: Focus visible for keyboard users */
.slab-main-image-link:focus-visible,
.slab-main-image:focus-visible,
.additional-image-thumb:focus-visible {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

/* Specifications table styling */
.bg-white\/5 table tbody tr {
    transition: background-color 0.2s ease;
}

.bg-white\/5 table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Button hover effects */
.bg-marque-gold:hover {
    background-color: #A89F91; /* Premium gold for hover */
    opacity: 0.9;
}

.bg-white\/10:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Light theme - Back to In Stock button hover */
body.theme-light .bg-white\/10:hover {
    background-color: rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
}

/* Hero section text styling */
section.relative.min-h-\[54vh\] h1 {
    font-weight: 300;
    letter-spacing: 0.02em;
}

section.relative.min-h-\[54vh\] p {
    font-weight: 400;
}

/* Hero section text colors - white tones for readability */
/* Force white text in both light and dark themes for hero section */
.in-stock-hero-bundle,
body.theme-light .in-stock-hero-bundle,
body.theme-dark .in-stock-hero-bundle,
html body:not(.theme-light) .in-stock-hero-bundle {
    color: #ffffff !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
}

.in-stock-hero-title,
body.theme-light .in-stock-hero-title,
body.theme-dark .in-stock-hero-title,
html body:not(.theme-light) .in-stock-hero-title {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9) !important;
}

.in-stock-hero-tagline,
body.theme-light .in-stock-hero-tagline,
body.theme-dark .in-stock-hero-tagline,
html body:not(.theme-light) .in-stock-hero-tagline {
    color: #ffffff !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
}

/* Responsive image gallery */
@media (max-width: 640px) {
    .grid.grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Responsive adjustments for very small screens */
@media (max-width: 375px) {
    section.relative.min-h-\[40vh\] h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .in-stock-detail-specs-heading {
        font-size: 1.25rem;
    }
    
    .in-stock-product-description {
        font-size: 0.875rem;
    }
}

/* Tablet adjustments */
@media (min-width: 640px) and (max-width: 1024px) {
    .grid.grid-cols-1.lg\:grid-cols-2 {
        gap: 2rem;
    }
}

/* Ensure proper spacing for action buttons */
.flex.flex-col.gap-3 {
    gap: 0.75rem;
}

/* Google Drive button - ensure text visibility (no inline styles) */
.cta-google-drive {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-google-drive-text {
    display: inline;
    color: inherit;
}

body.theme-light .cta-google-drive .cta-google-drive-text {
    color: #1a1a1a;
}

body.theme-dark .cta-google-drive .cta-google-drive-text,
main.bg-marque-black .cta-google-drive .cta-google-drive-text {
    color: #ffffff;
}

/* Back to In Stock button - Desktop only */
@media (min-width: 1024px) {
    .hidden.lg\:flex {
        display: flex !important;
    }
}

@media (max-width: 1023px) {
    .hidden.lg\:flex {
        display: none !important;
    }
}

/* Stock status badge styling */
.stock-status-badge {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

.stock-status-badge[data-status="in_stock"] {
    background-color: rgba(34, 197, 94, 0.3);
    color: rgb(134, 239, 172);
    border-color: rgb(74, 222, 128);
}

.stock-status-badge[data-status="reserved"] {
    background-color: rgba(234, 179, 8, 0.3);
    color: rgb(253, 224, 71);
    border-color: rgb(250, 204, 21);
}

.stock-status-badge[data-status="sold"] {
    background-color: rgba(220, 38, 38, 0.3);
    color: rgb(248, 113, 113);
    border-color: rgb(239, 68, 68);
}

.stock-status-badge[data-status]:not([data-status="in_stock"]):not([data-status="reserved"]):not([data-status="sold"]) {
    background-color: rgba(255, 255, 255, 0.2);
    color: rgb(255, 255, 255);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Light theme - Stock status badge text must be dark gray for readability */
body.theme-light .stock-status-badge[data-status="in_stock"],
body.theme-light .stock-status-badge[data-status="reserved"],
body.theme-light .stock-status-badge[data-status="sold"],
body.theme-light .stock-status-badge[data-status] {
    color: #374151 !important; /* Gray-700 - gri-siyah ton */
}

/* Smooth transitions for all interactive elements */
a,
button {
    transition: all 0.3s ease;
}

/* Table cell padding adjustments for mobile */
@media (max-width: 640px) {
    .bg-white\/5 table tbody tr td {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        font-size: 0.875rem;
    }
}

/* Hero image overlay gradient */
section.relative.min-h-\[54vh\] .absolute.inset-0.bg-gradient-to-b {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(17, 17, 17, 1) 100%
    );
}

/* Ensure images load smoothly */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Close button in modal */
#close-image-modal {
    transition: transform 0.2s ease, color 0.2s ease;
}

#close-image-modal:hover {
    transform: scale(1.1);
    color: #d4af37;
}

/* Modal navigation arrows */
.image-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background-color: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.image-modal-nav svg {
    width: 1.5rem;
    height: 1.5rem;
}

.image-modal-nav--prev {
    left: 1.5rem;
}

.image-modal-nav--next {
    right: 1.5rem;
}

.image-modal-nav:hover {
    background-color: rgba(0, 0, 0, 0.65);
    border-color: #d4af37;
    color: #d4af37;
}

@media (max-width: 640px) {
    .image-modal-nav {
        width: 2.5rem;
        height: 2.5rem;
    }

    .image-modal-nav--prev {
        left: 0.75rem;
    }

    .image-modal-nav--next {
        right: 0.75rem;
    }
}

/* Additional images grid spacing */
.grid.grid-cols-4.gap-2 img,
.grid.grid-cols-2.gap-2 img {
    object-fit: cover;
    min-height: 0;
}

/* Ensure images don't overflow on mobile */
@media (max-width: 640px) {
    .slab-main-image {
        max-width: 100%;
        height: auto;
    }
}

/* Specifications section heading */
h2.font-inter.in-stock-detail-specs-heading {
    font-weight: 300;
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: #A89F91; /* Premium gold for dark theme */
}

/* Light theme - Premium black for light theme */
body.theme-light h2.in-stock-detail-specs-heading,
body.theme-light .in-stock-detail-specs-heading {
    color: #0a0a0a !important; /* Premium black */
}

/* Light theme - Table text colors */
body.theme-light .bg-white\/5 table tbody tr td {
    color: #1a1a1a !important;
}

body.theme-light .bg-white\/5 table tbody tr td:first-child {
    color: #4a4a4a !important;
}

/* Product description styling */
.in-stock-product-description {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.in-stock-product-description strong {
    font-weight: 600;
    color: rgba(255, 255, 255, 1);
}

/* Category and product link styling */
.in-stock-category-link,
.in-stock-product-link {
    color: #A89F91; /* Premium gold for dark theme */
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.in-stock-category-link:hover,
.in-stock-product-link:hover {
    color: #C4BBAF; /* Lighter premium gold on hover */
    opacity: 0.9;
}

.in-stock-product-description strong .in-stock-category-link,
.in-stock-product-description strong .in-stock-product-link {
    font-weight: 600;
}

/* Light theme - Product description text colors */
body.theme-light .in-stock-product-description {
    color: #1a1a1a !important;
}

/* Contact information text styling */
.in-stock-contact-text {
    color: rgba(255, 255, 255, 0.8);
}

body.theme-light .in-stock-contact-text {
    color: #4a4a4a !important;
}

body.theme-light .in-stock-product-description strong {
    color: #000000 !important;
}

body.theme-light .in-stock-category-link,
body.theme-light .in-stock-product-link {
    color: #b8860b;
}

body.theme-light .in-stock-category-link:hover,
body.theme-light .in-stock-product-link:hover {
    color: #8b6914;
}

/* Gold accent line */
.w-24.h-1.bg-marque-gold {
    background: linear-gradient(to right, #d4af37, rgba(212, 175, 55, 0.6));
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Slightly reduce hero title size across breakpoints for better visual balance */
.in-stock-hero-title {
    /* small reduction from Tailwind utility sizes */
    font-size: 1.2rem !important;
    line-height: 1.06;
}

@media (min-width: 640px) {
    .in-stock-hero-title {
        font-size: 1.5rem !important;
    }
}

@media (min-width: 768px) {
    .in-stock-hero-title {
        font-size: 1.8rem !important;
    }
}

@media (min-width: 1024px) {
    .in-stock-hero-title {
        font-size: 2.3rem !important;
    }
}

@media (min-width: 1280px) {
    .in-stock-hero-title {
        font-size: 2.8rem !important;
    }
}

/* CTA split row: WhatsApp + Contact Us side by side */
.cta-split-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}
.cta-split-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.5rem;
    border-radius: 0.25rem;
    font-family: var(--site-font-family);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: background-color 150ms ease, border-color 150ms ease;
}
.cta-split-contact {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}
.cta-split-contact:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}
.cta-split-wa {
    /* Match visual weight of other CTAs by default, but keep WhatsApp hover accent */
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    gap: 0.4rem;
}
.cta-split-wa:hover {
    background: rgba(37,211,102,0.08);
    border-color: #25d366;
    color: #25d366;
}
.cta-wa-svg {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
}
.cta-wa-text {
    font-size: 0.9375rem;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: none;
}
.theme-light .cta-split-contact {
    background: rgba(0,0,0,0.05);
    color: #1a1a1a;
    border-color: rgba(0,0,0,0.12);
}
.theme-light .cta-split-contact:hover {
    background: rgba(0,0,0,0.1);
    border-color: rgba(0,0,0,0.18);
}
.theme-light .cta-split-wa {
    background: rgba(0,0,0,0.05);
    color: #1a1a1a;
    border-color: rgba(0,0,0,0.12);
}
.theme-light .cta-split-wa:hover {
    background: rgba(37,211,102,0.06);
    border-color: #25d366;
    color: #128c7e;
}

/* WCAG 2.1: Reduce animations when user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .additional-image-thumb,
    .additional-image-thumb:hover,
    #close-image-modal,
    #close-image-modal:hover,
    .image-modal-nav,
    .image-modal-nav:hover,
    a,
    button,
    .bg-white\/5 table tbody tr {
        transition: none !important;
    }
    .additional-image-thumb:hover {
        transform: none;
    }
    #close-image-modal:hover {
        transform: none;
    }
}
