/* File: chicken-inventory-manager-v4/assets/css/chim-yard-sale.css */

/* Force scroll on mobile/themes that hide overflow */
html, body {
    overflow: visible !important;
    overflow-x: visible !important;
}

/* Base Styles */
.chim-reset-wrapper { box-sizing: border-box; }
.chim-reset-wrapper * { box-sizing: border-box; }

#page, #content, #primary, #main, article, 
.site-content, .ast-container, .single-layout-1, .ast-article-single,
.entry-content, .chim-reset-wrapper, .chalk-wrap, .chalk-board, .farm-section { 
    overflow: visible !important; 
    transform: none !important;
    contain: none !important;
    clip-path: none !important;
}

/* --- UPDATED: Fix paragraph margins in entry content --- */
.entry-content p { margin-top: 0 !important; }

/* Chalkboard Container */
.chalk-wrap { background: transparent; padding: 15px; max-width: 1200px; margin: 20px auto; }
.chalk-board { background: transparent; padding: 30px; color: #f0f0f0; border: none; box-shadow: none; min-height: 500px; }
.chalk-title { text-align: center; color: #fff; font-size: 3.5rem; margin-bottom: 30px; text-shadow: 3px 3px 2px rgba(0,0,0,0.5); font-family: 'Fredericka the Great', cursive; font-weight: 400; line-height: 1.2; opacity: 0.95; }

.chalk-footer { text-align:center; margin-top:40px; color:#aaa; font-family: 'Cabin Sketch', cursive; font-size: 1.5rem; }

/* Date Headers */
.farm-section { padding-bottom: 40px; position: relative; display: block; }
.chalk-date { 
    background: rgba(30, 30, 30, 0.95); 
    border-bottom: 2px dashed rgba(255,255,255,0.3); 
    box-shadow: 0 4px 6px rgba(0,0,0,0.5); 
    padding: 15px 10px; 
    margin-bottom: 20px; 
    font-size: 2rem; 
    color: #81d4fa; 
    font-family: 'Cabin Sketch', cursive; 
    font-weight: 700; 
    text-shadow: 1px 1px 2px #000; 
    width: 100%;
}

@media (max-width: 1024px) {
    .chalk-date { 
        position: -webkit-sticky !important; 
        position: sticky !important; 
        top: 0 !important; 
        z-index: 100 !important; 
    }
}

/* Inventory Cards */
.farm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 30px; }
.farm-card { background: #fdfdfd; padding: 10px; box-shadow: 3px 3px 6px rgba(0,0,0,0.4); font-family: 'Patrick Hand', cursive; color: #222; position: relative; margin-top: 15px; transform: rotate(-1deg); transition: transform 0.2s; }
.farm-card:nth-child(even) { transform: rotate(1deg); }
.farm-card:hover { transform: scale(1.03) rotate(0); z-index: 10; }

.card-tape { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); width: 90px; height: 25px; background: rgba(255, 255, 255, 0.3); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 1px 2px rgba(0,0,0,0.1); z-index: 2; opacity: 0.8; }
.card-inner { border: 1px solid #eee; padding: 10px; height: 100%; display: flex; flex-direction: column; }

/* --- UPDATED: Breed Name (Acme Font) --- */
.farm-card h3 { 
    margin: 5px 0 10px 0; 
    font-family: 'Acme', sans-serif;
    font-weight: 400;
    font-size: 1.5rem; 
    text-align: center; 
    color: #333; 
    line-height: 1.1; 
}

.straight-run-label {
    background: #607d8b; color: #fff; text-align: center; font-family: 'Patrick Hand', cursive; font-size: 1rem; padding: 3px 0; margin-bottom: 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 1px; box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

/* Image Area */
.card-img-wrap { margin-bottom: 10px; border: 3px solid #fff; box-shadow: 1px 1px 3px rgba(0,0,0,0.2); overflow: hidden; height: 250px; position: relative; cursor: pointer; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.chim-sale-sash {
    position: absolute; top: 15px; right: -30px; background: #d63638; color: #fff; width: 120px; text-align: center; padding: 5px 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: bold;
    font-size: 1.0rem; transform: rotate(45deg); box-shadow: 0 2px 5px rgba(0,0,0,0.3); z-index: 20; line-height: 1.2;
}

.chim-gallery-icon {
    position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.6); color: #fff; padding: 5px; border-radius: 50%; z-index: 5; pointer-events: none;
}

/* Details & Stats */
.card-details { font-size: 1.1rem; line-height: 1.3; color: #444; margin-bottom: 10px; flex-grow: 1; }
.card-details p { margin: 0 0 2px 0; }

.laying-status { text-align: center; margin-bottom: 8px; font-family: 'Patrick Hand', cursive; font-weight: bold; font-size: 1.1rem; padding: 4px; border-radius: 4px; }
.status-soon { background: #e3f2fd; color: #1565c0; border: 1px dashed #90caf9; }
.status-laying { background: #e8f5e9; color: #2e7d32; border: 1px dashed #a5d6a7; }

.card-grade-row { display: flex; justify-content: space-between; align-items: center; border-top: 2px dashed #ccc; padding-top: 10px; margin-bottom: 10px; }
.card-stock { font-weight: bold; font-size: 0.95rem; color: #555; background: #eee; padding: 2px 6px; border-radius: 4px; }

/* Price Font (System) */
.card-price { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: bold;
    font-size: 1.6rem; 
    color: #d32f2f; 
    transform: rotate(-5deg); 
}

.card-actions { display: flex; gap: 8px; }
.card-btn { flex: 1; display: block; text-decoration: none; font-family: 'Patrick Hand', cursive; font-weight: bold; padding: 6px 4px; font-size: 1.1rem; border-radius: 3px; border: 2px solid #333; text-align: center; cursor: pointer; transition: 0.2s; }
.card-btn.view { background: #fff; color: #333; border-style: dashed; }
.card-btn.cart { background: #333; color: #fff; border-style: solid; }
.card-btn:hover { opacity: 0.7; }

.chim-no-inventory { text-align: center; padding: 40px; font-size: 1.2rem; color: #fff; }

/* --- LIGHTBOX --- */
.chim-lightbox {
    display: none; position: fixed; z-index: 99999; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.9); justify-content: center; align-items: center;
}
.chim-lightbox-content { margin: auto; display: block; max-width: 90%; max-height: 80vh; position: relative; }
#chim-lightbox-img { width: auto; max-width: 100%; max-height: 80vh; border: 4px solid #fff; box-shadow: 0 0 20px rgba(0,0,0,0.5); }

.chim-lightbox-close { position: absolute; top: 20px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; z-index: 100000; }
.chim-lightbox-close:hover { color: #bbb; }

.chim-lightbox-nav { position: absolute; top: 50%; width: 100%; display: flex; justify-content: space-between; transform: translateY(-50%); pointer-events: none; }
.chim-nav-btn { pointer-events: auto; cursor: pointer; background: rgba(0,0,0,0.5); color: #fff; padding: 16px; font-size: 24px; user-select: none; border-radius: 50%; margin: 0 -20px; }
.chim-nav-btn:hover { background: rgba(255,255,255,0.2); }

#chim-lightbox-caption { margin-top: 10px; color: #ccc; text-align: center; font-family: 'Patrick Hand', cursive; font-size: 1.5rem; }
#chim-lightbox-counter { color: #777; text-align: center; font-size: 0.9rem; margin-top: 5px; }

/* Responsive */
@media (max-width: 768px) {
    .card-inner { display: flex; flex-direction: column; }
    .card-img-wrap { order: -1; height: 250px; margin-bottom: 15px; }
    .farm-card h3 { font-size: 2.2rem !important; } 
    .farm-card { padding: 8px; }
    .chim-lightbox-nav { width: 90%; margin: 0 5%; }
}