/* ========================================
   RESPONSIVE — Carol's Homestead
   Media queries for all breakpoints
   ======================================== */

/* ════════════════════════════════════════════════════════════════════════════
   Large Desktops → Standard Desktop (≤ 1200px)
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .container {
        padding: 0 1rem;
    }

    .container-wide {
        padding: 0 1rem;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .footer-grid {
        gap: 2rem;
        padding: 0 1rem;
    }
}

/* ════════════════════════════════════════════════════════════════════════════
   Desktop → Tablet (≤ 992px)
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }

    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }

    .section {
        padding: 3rem 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
        max-width: 100%;
    }

    .slideshow-wrapper {
        padding: 1.5rem;
    }

    .slideshow-container {
        min-height: 300px;
    }

    .admin-form .form-row {
        grid-template-columns: 1fr;
    }
}

/* ════════════════════════════════════════════════════════════════════════════
   Tablet → Mobile (≤ 768px)
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* ── Hide Vine Navigation ── */
    .vine-nav {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 5rem 1rem 1.5rem;
    }

    .site-footer {
        margin-left: 0;
    }

    /* ── Mobile Menu Toggle ── */
    .mobile-menu-toggle {
        display: flex;
    }

    /* ── Nav Links: hidden by default, shown when .open ── */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26, 48, 9, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 0.85rem 1.5rem;
        border-radius: 0;
        font-size: 1rem;
    }

    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .nav-links a.active::after {
        display: none;
    }

    .top-nav-inner {
        position: relative;
    }

    /* ── Grids ── */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* ── Hero ── */
    .hero {
        min-height: 60vh;
        padding: 5rem 1.5rem 3rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* ── Blog Images ── */
    .blog-image-left,
    .blog-image-right {
        float: none;
        max-width: 100%;
        margin: 1rem 0;
        display: block;
    }

    /* ── Slideshow ── */
    .slideshow-wrapper {
        padding: 1rem;
        margin: 1rem;
        border-radius: var(--radius);
    }

    .slideshow-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .slideshow-container {
        min-height: 250px;
    }

    .slideshow-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .slideshow-nav {
        gap: 1rem;
    }

    .slide-title {
        font-size: 1.35rem;
    }

    .slide-body {
        font-size: 1rem;
    }

    /* ── Footer ── */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    /* ── Section ── */
    .section {
        padding: 2.5rem 0;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    /* ── Cart ── */
    .cart-table th:nth-child(n+3),
    .cart-table td:nth-child(n+3) {
        display: none;
    }

    /* ── Stats ── */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ════════════════════════════════════════════════════════════════════════════
   Mobile Small (≤ 576px)
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 576px) {
    /* ── Nav Auth ── */
    .nav-auth {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .nav-auth .nav-cart {
        align-self: center;
    }

    /* ── Typography ── */
    .hero-content h1 {
        font-size: 1.75rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    /* ── Product Grid ── */
    .product-grid {
        grid-template-columns: 1fr;
    }

    /* ── Cart Table Mobile ── */
    .cart-item-img {
        width: 45px;
        height: 45px;
    }

    /* ── Stats ── */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* ── Admin Sidebar: hide on small screens ── */
    .admin-sidebar {
        display: none;
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        display: block;
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
        padding: 1rem;
    }

    .admin-mobile-toggle {
        display: flex;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .admin-header h1 {
        font-size: 1.35rem;
    }

    /* ── Slideshow ── */
    .slideshow-dots {
        display: none;
    }

    /* ── Price ── */
    .price-tag {
        font-size: 1.25rem;
    }

    /* ── Buttons ── */
    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    /* ── Pagination ── */
    .pagination {
        gap: 0.25rem;
    }

    .pagination a,
    .pagination span {
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
    }

    /* ── Newsletter ── */
    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
    }
}

/* ════════════════════════════════════════════════════════════════════════════
   Print Styles
   ════════════════════════════════════════════════════════════════════════════ */
@media print {
    .vine-nav,
    .top-nav,
    .mobile-menu-toggle,
    .admin-sidebar,
    .slideshow-nav,
    .nav-auth,
    .site-footer {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .admin-main {
        margin-left: 0 !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .card,
    .admin-card,
    .stat-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
