/* ============================================
   Elaine's Cigars - Main Stylesheet
   ============================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(to bottom, #1a1a1a, #0a0a0a);
    color: #e0e0e0;
    min-height: 100vh;
    padding-bottom: 40px;
}

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

.site-header {
    position: relative;
    width: 100%;
    height: 300px;
    background: #000;
    overflow: hidden;
    margin-bottom: 40px;
}

.header-image {
    width: 100%;
    height: 150%;
    object-fit: cover;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7) 50%, #0a0a0a 100%);
    pointer-events: none;
    z-index: 5;
}

.header-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a, #333);
}

.header-placeholder h1 {
    font-family: 'Alfa Slab One', Impact, sans-serif;
    font-size: 4rem;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 4px;
}

/* Ribbon Banner - Slides in from Left with Forked End */
.ribbon-banner {
    position: absolute;
    top: 80px;
    left: -350px;
    width: 320px;
    height: 80px;
    background: linear-gradient(135deg, #dc143c, #b91a1a);
    box-shadow: 3px 3px 10px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    animation: slideIn 1s ease-out forwards;
    animation-delay: 0.5s;
    clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 50%, calc(100% - 30px) 100%, 0 100%);
}

@keyframes slideIn {
    from {
        left: -350px;
    }
    to {
        left: 0;
    }
}

/* Bottom fold shadow */
.ribbon-banner::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: calc(100% - 30px);
    height: 10px;
    background: linear-gradient(to right, rgba(0,0,0,0.4), rgba(0,0,0,0.2));
    filter: blur(3px);
}

.ribbon-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 20px;
    width: calc(100% - 30px);
}

.ribbon-selfie {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.ribbon-text {
    color: #fff;
    font-family: 'Barlow', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Purchase Log Tab */
.purchase-log-tab {
    position: absolute;
    bottom: -10px;
    right: 40px;
    background: linear-gradient(to bottom, #d4af37, #c9a961);
    color: #000;
    font-family: 'Alfa Slab One', Impact, sans-serif;
    font-size: 1.1rem;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
    letter-spacing: 2px;
    z-index: 20;
}

.purchase-log-tab:hover {
    background: linear-gradient(to bottom, #e5c158, #d4af37);
    transform: translateY(2px);
    box-shadow: 0 6px 12px rgba(212, 175, 55, 0.6);
}

/* Search Button */
.search-button {
    position: absolute;
    bottom: -10px;
    left: 40px;
    background: linear-gradient(to bottom, #4a90e2, #357abd);
    color: #fff;
    font-family: 'Alfa Slab One', Impact, sans-serif;
    font-size: 1.1rem;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.4);
    transition: all 0.3s ease;
    letter-spacing: 2px;
    z-index: 20;
}

.search-button:hover {
    background: linear-gradient(to bottom, #5aa3f0, #4a90e2);
    transform: translateY(2px);
    box-shadow: 0 6px 12px rgba(74, 144, 226, 0.6);
}

/* ============================================
   HUMIDOR DISPLAY
   ============================================ */

.humidor-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.humidor-exterior {
    background: linear-gradient(135deg, #1a1a1a, #000000);
    border: 3px solid #333;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.humidor-interior {
    background: linear-gradient(to bottom, #e8d4b0, #d4bc96);
    border: 2px solid #c4a876;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 20px;
    min-height: 600px;
}

/* Humidor Columns */
.humidor-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Compartments */
.compartment {
    background: linear-gradient(to bottom, #f5e6d3, #e8d4b0);
    border: 2px solid #d0b995;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-compartment {
    flex: 1;
}

.bottom-compartment {
    flex: 1;
}

/* Sections */
.section {
    background: linear-gradient(to bottom, #f0dfc5, #e0cfb5);
    border: 1px solid #c4a876;
    border-radius: 4px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.section:hover {
    background: linear-gradient(to bottom, #fff8e8, #f0dfc5);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.upper-shelf {
    flex: 4;
}

.lower-cubby {
    flex: 6;
}

/* Section Handle */
.section-handle {
    width: 50px;
    height: 12px;
    background: linear-gradient(to bottom, #8b7355, #6b5640);
    border: 1px solid #4a3a28;
    border-radius: 3px;
    margin: 0 auto 10px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

/* Section Label */
.section-label {
    text-align: center;
    color: #2a2a2a;
    font-size: 0.9rem;
    font-weight: 600;
}

.cigar-count {
    color: #666;
    font-size: 0.85rem;
    font-weight: normal;
}

/* ============================================
   MODALS
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    overflow: auto;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(to bottom, #2a2a2a, #1a1a1a);
    margin: 40px auto;
    padding: 30px;
    border: 2px solid #444;
    border-radius: 12px;
    max-width: 1200px;
    position: relative;
    box-shadow: 0 10px 50px rgba(0,0,0,0.9);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #fff;
}

.modal-content h2 {
    font-family: 'Alfa Slab One', Impact, sans-serif;
    color: #d4af37;
    font-size: 2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ============================================
   CIGAR GRID
   ============================================ */

.cigar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cigar-card {
    background: linear-gradient(to bottom, #333, #222);
    border: 2px solid #444;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    gap: 15px;
}

.cigar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
}

/* Cigar Card - Left Side (Image & Info) */
.cigar-card-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cigar-main-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #555;
}

.cigar-card-info h3 {
    color: #e0e0e0;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.cigar-card-info .brand {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.cigar-card-info .rating {
    font-size: 1.2rem;
}

/* Cigar Card - Right Side (Selfie) */
.cigar-card-right {
    display: flex;
    align-items: center;
}

.cigar-selfie-small {
    width: 100px;
    height: 100px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid #555;
}

/* Badges */
.favorite-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 2px solid #ff6b35;
    z-index: 5;
}

.sublocation-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 2px solid #8ab4f8;
    z-index: 5;
}

/* Stars */
.star {
    color: #f5c518;
    font-size: 1rem;
}

.star.filled {
    color: #f5c518;
}

/* ============================================
   CIGAR DETAIL VIEW
   ============================================ */

.cigar-detail-container {
    display: flex;
    gap: 30px;
}

.cigar-detail-left {
    flex: 1;
}

.cigar-detail-right {
    flex: 1;
}

/* Left Column - Images & Basic Info */
.sublocation-info {
    background: rgba(138, 180, 248, 0.1);
    border: 1px solid #8ab4f8;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 15px;
    color: #8ab4f8;
    font-size: 0.95rem;
}

.sublocation-info strong {
    font-weight: 600;
}

.detail-main-image-container {
    position: relative;
    margin-bottom: 15px;
}

.detail-main-image {
    width: 100%;
    border-radius: 8px;
    border: 3px solid #555;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.detail-main-image:hover {
    transform: scale(1.02);
}

.favorite-badge-detail {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid #ff6b35;
}

/* Thumbnail Images */
.detail-thumbnails {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-thumbnail {
    width: calc(33.333% - 7px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #555;
    cursor: pointer;
    transition: all 0.3s ease;
}

.detail-thumbnail:hover {
    border-color: #d4af37;
    transform: scale(1.05);
}

/* Basic Info */
.detail-basic-info h2 {
    color: #e0e0e0;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.detail-basic-info .brand {
    color: #999;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.detail-basic-info .rating {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.detail-info-row {
    margin-bottom: 12px;
    color: #aaa;
    font-size: 0.95rem;
}

.detail-info-row strong {
    color: #e0e0e0;
    font-weight: 600;
}

.detail-info-row a {
    color: #4a90e2;
    text-decoration: none;
}

.detail-info-row a:hover {
    text-decoration: underline;
}

.detail-tasting-notes {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 4px solid #d4af37;
}

.detail-tasting-notes strong {
    color: #d4af37;
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.detail-tasting-notes p {
    color: #ccc;
    line-height: 1.6;
}

/* Right Column - Review Paper */
.review-paper {
    background: #faf8f0;
    border: 1px solid #d0c8b0;
    border-radius: 8px;
    padding: 30px;
    min-height: 400px;
    position: relative;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.05);
}

.review-selfie {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #d4af37;
    float: right;
    margin: 0 0 15px 15px;
    shape-outside: circle();
}

.review-text {
    font-family: 'Barlow', 'Segoe UI', sans-serif;
    color: #333;
    font-size: 1rem;
    line-height: 1.5;
    text-align: justify;
    margin-bottom: 20px;
}

.review-text p {
    margin-bottom: 15px;
}

.review-text p:last-child {
    margin-bottom: 0;
}

.review-text strong {
    font-weight: 600;
    color: #1a1a1a;
}

.review-text em {
    font-style: italic;
}

.review-text .review-h1 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2a2a2a;
    margin: 20px 0 10px 0;
    border-bottom: 2px solid #d4af37;
    padding-bottom: 5px;
}

.review-text .review-h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 15px 0 8px 0;
}

.review-date {
    text-align: right;
    font-weight: bold;
    color: #555;
    margin-top: 20px;
    font-size: 0.95rem;
}

.review-footnotes {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #d0c8b0;
}

.review-footnotes h4 {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.review-footnotes ul {
    list-style: none;
    padding: 0;
}

.review-footnotes li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.review-footnotes li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #d4af37;
    font-weight: bold;
}

.review-footnotes a {
    color: #4a90e2;
    text-decoration: none;
    font-size: 0.9rem;
}

.review-footnotes a:hover {
    text-decoration: underline;
}

/* ============================================
   PURCHASE LOG TABLE
   ============================================ */

.purchase-log-content {
    max-width: 1000px;
}

.search-content {
    max-width: 800px;
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

#purchaseLogTable {
    width: 100%;
    border-collapse: collapse;
    background: #2a2a2a;
}

#purchaseLogTable thead {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
}

#purchaseLogTable th {
    padding: 15px;
    text-align: left;
    color: #d4af37;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border-bottom: 2px solid #444;
}

#purchaseLogTable td {
    padding: 12px 15px;
    color: #ccc;
    border-bottom: 1px solid #333;
}

#purchaseLogTable tr:hover {
    background: rgba(212, 175, 55, 0.1);
}

#purchaseLogTable .cigar-link {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
}

#purchaseLogTable .cigar-link:hover {
    color: #6ab0ff;
    text-decoration: underline;
}

/* ============================================
   SEARCH
   ============================================ */

.search-input-container {
    margin-bottom: 30px;
}

#searchInput {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 8px;
    color: #e0e0e0;
    transition: border-color 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

#searchResults {
    min-height: 100px;
}

.search-no-results {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1rem;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ============================================
   IMAGE ZOOM OVERLAY
   ============================================ */

.image-zoom-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#zoomedImage {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.9);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    margin-top: 60px;
    width: 100%;
}

/* Three Column Section */
.footer-columns {
    background: #000;
    padding: 0px 0px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-column h3 {
    color: #d4af37;
    font-size: 12px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column p {
    color: #ccc;
    line-height: 1.6;
    text-align: center;
    text-align: center;
    font-size: 15px;
    align-content: center;
}

.footer-column img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding-top: 40px;
}

.footer-column[align="middle"] {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

/* Full Width Banner Section */
.footer-banner {
    width: 100%;
    min-height: 200px;
    background: #1a1a1a;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    text-align: center;
}

/* Add background image inline or via style attribute */
/* Example: <div class="footer-banner" style="background-image: url('path/to/image.jpg');"> */

.footer-banner-content {
    max-width: 1200px;
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 1;
}

.footer-banner-content p {
    font-size: 12px;
    line-height: 1.8;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .header-placeholder h1 {
        font-size: 3rem;
    }
    
    .humidor-exterior {
        padding: 20px;
    }
    
    .cigar-detail-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .site-header {
        height: 200px;
        padding-bottom: 50px;
    }
    
    .header-placeholder h1 {
        font-size: 2rem;
    }
    
    .ribbon-banner {
        top: 50px;
        width: 260px;
        height: 60px;
    }
    
    .ribbon-content {
        gap: 10px;
        padding: 0 15px;
    }
    
    .ribbon-selfie {
        width: 40px;
        height: 40px;
    }
    
    .ribbon-text {
        font-size: 0.85rem;
    }
    
    .purchase-log-tab {
        font-size: 0.75rem;
        padding: 8px 12px;
        right: 10px;
        bottom: 5px;
        letter-spacing: 1px;
    }
    
    .search-button {
        font-size: 0.75rem;
        padding: 8px 12px;
        left: 10px;
        bottom: 5px;
        letter-spacing: 1px;
    }
    
    .humidor-interior {
        flex-direction: column;
    }
    
    .cigar-grid {
        grid-template-columns: 1fr;
    }
    
    .cigar-card {
        flex-direction: column;
    }
    
    .cigar-card-right {
        justify-content: center;
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px auto;
    }
    
    .detail-thumbnails {
        flex-wrap: wrap;
    }
    
    .detail-thumbnail {
        width: calc(50% - 5px);
    }
    
    .table-wrapper {
        overflow-x: scroll;
    }
    
   /* Footer responsive */
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 10px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-column p {
        font-size: 11px;
        line-height: 1.4;
    }
    
    .footer-column img {
        max-width: 200px;
        margin: 0 auto;
        padding-top: 20px;
    }
    
    .footer-banner {
        min-height: auto;
        padding: 20px 10px;
    }
    
    .footer-banner-content p {
        font-size: 10px;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .title-selfie {
        width: 50px;
        height: 50px;
    }
    
    .section-label {
        font-size: 0.8rem;
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
    }
}