/* Mobile optimizations for Bathi Farms */

/* Hero video - shift view to show sheep on mobile */
@media (max-width: 768px) {
  .hero-video {
    object-position: 65% center;
  }
}

/* Fix mobile navbar */
@media (max-width: 768px) {
  .header {
    padding: 6px 0;
  }
  
  .nav {
    padding: 8px 0;
  }
  
  .brand {
    font-size: 1rem;
    font-weight: 600;
    gap: 5px;
  }
  
  .brand img {
    height: 50px;
    width: auto;
  }
  
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 15px;
    gap: 15px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    align-items: center;
  }
  
  .nav-links a {
    font-size: 0.95rem;
  }
  
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-toggle {
    display: flex;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
  }
  
  .nav-toggle span {
    width: 20px;
    height: 2px;
  }
  
  .nav-actions {
    gap: 8px;
  }
  
  .cart-toggle {
    padding: 6px 10px;
    font-size: 0.9rem;
  }
  
  .cart-count {
    width: 16px;
    height: 16px;
    font-size: 0.65rem;
  }
  
}

@media (max-width: 480px) {
  .header {
    padding: 5px 0;
  }
  
  .nav {
    padding: 6px 0;
  }
  
  .brand {
    font-size: 0.95rem;
    font-weight: 600;
    gap: 4px;
  }
  
  .brand img {
    height: 44px;
    width: auto;
  }
  
  .nav-toggle {
    padding: 5px;
    width: 36px;
    height: 36px;
  }
  
  .nav-toggle span {
    width: 18px;
    height: 1.5px;
  }
  
  .cart-toggle {
    padding: 5px 8px;
    font-size: 0.85rem;
  }
}

/* Fullscreen hero section */
@media (max-width: 768px) {
  body {
    padding-top: 64px; /* Reduce body padding-top */
  }
  
  .hero {
    min-height: calc(100vh - 64px);
    padding: 40px 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .hero-content {
    padding-bottom: 20px; /* Add space at bottom */
  }
}

/* Products section - Swipeable cards */
@media (max-width: 768px) {
  .products {
    padding: 60px 0;
    overflow: hidden;
  }
  
  .products .container {
    padding: 0 20px;
  }
  
  .products .grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .products .grid::-webkit-scrollbar {
    display: none;
  }
  
  .products .grid {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  /* Center-focused carousel adjustments */
  .product-carousel .carousel-nav { display: none; }
  .product-carousel .carousel-wrapper { 
    height: 520px; 
    padding: 0 10px;
  }
  .product-carousel .carousel-wrapper .product { 
    width: 75vw; 
    max-width: 280px;
    min-height: 500px;
    padding: 16px;
    margin: 0 auto;
  }
  .product-carousel .carousel-wrapper .product .product-media { 
    height: 220px;
    margin-bottom: 12px;
  }
  .product-carousel .carousel-wrapper .product h3 { 
    font-size: 1rem; 
    margin: 0 0 6px 0;
    line-height: 1.3;
  }
  .product-carousel .carousel-wrapper .product p { 
    font-size: 0.85rem; 
    margin: 0 0 12px 0;
    line-height: 1.5;
    color: var(--muted);
  }
  .product-carousel .carousel-wrapper .product .product-footer { 
    margin-top: auto;
    padding-top: 12px;
    gap: 8px; 
  }
  .product-carousel .carousel-wrapper .product .product-price { 
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
  }
  .product-carousel .carousel-wrapper .product .add-to-cart-btn { 
    height: 34px; 
    padding: 0 10px; 
    font-size: 0.82rem;
    min-width: 0;
    flex: 1;
  }
  .product-carousel .carousel-wrapper .product .quantity-selector .quantity-btn { 
    width: 24px; 
    height: 24px;
    font-size: 13px;
  }

  /* Hide dots on mobile */
  .product-dots {
    display: none;
  }

  /* Prevent hover effects on touch devices */
  @media (hover: none) {
    .product-carousel .carousel-wrapper .product:hover {
      transform: translate(-50%, 0) scale(1) !important;
    }
  }

  
  .product {
    flex: 0 0 280px;
    padding: 0;
    margin: 0;
    background-color: rgba(10, 20, 15, 0.6);
    border: 1px solid rgba(211, 164, 58, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    scroll-snap-align: start;
    transition: transform 0.3s ease;
  }
  
  /* Remove transform on hover to avoid conflicts with JS carousel transforms */
  .product:hover {
    transform: none;
  }
  
  .product-image {
    aspect-ratio: 3/4;
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
  }
  
  .product-image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
  
  .product-content {
    padding: 20px;
  }
  
  .product-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-family: var(--serif);
    color: var(--gold);
  }
  
  .product-description {
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 0.9rem;
    color: var(--text-light);
  }
  
  .product-price {
    margin: 15px 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gold);
  }
  
  .product-actions {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .carousel-nav,
  .carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 20px;
  }

  .carousel-dots {
    gap: 8px;
  }

  .carousel-dot {
    width: 8px;
    height: 8px;
    background-color: rgba(211, 164, 58, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .carousel-dot.active {
    background-color: var(--gold);
    transform: scale(1.2);
  }
  
  /* Add to cart button mobile styling */
  .add-to-cart-btn {
    padding: 8px 12px;
    font-size: 0.9rem;
    border-radius: var(--radius);
    height: 36px;
  }
  
  .add-to-cart-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* Mobile cart quantity buttons */
@media (max-width: 768px) {
  .cart-quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius);
  }
  
  /* Mobile checkout button */
  .checkout-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-2));
    color: var(--bg);
    font-weight: 600;
  }
}

/* Improved footer design */
@media (max-width: 768px) {
  .footer {
    padding-top: 60px;
    position: relative;
    background-color: rgba(10, 20, 15, 0.8);
  }
  
  .footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
    box-shadow: 0 0 10px rgba(211, 164, 58, 0.5);
  }
  
  .footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-brand {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(211, 164, 58, 0.15);
  }

  .footer-brand .brand {
    font-size: 2rem;
    margin-bottom: 10px;
    display: inline-block;
  }

  .footer-tagline {
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 1px;
  }
  
  .footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
  }
  
    
  .footer-nav, .footer-contact {
    padding: 15px 0;
    text-align: center;
  }
  
  .footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 15px;
    margin: 0;
    padding: 0;
  }

  .footer-nav li {
    margin: 5px;
  }
  
  .footer-nav h4, .footer-contact h4 {
    font-family: var(--serif);
    font-size: 1.2rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    color: var(--gold);
  }
  
  .footer-nav h4::after, .footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background-color: var(--gold);
  }

  .footer-icon {
    color: var(--gold);
    margin-right: 5px;
  }

  .footer a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .footer a:hover {
    color: var(--gold-light);
    text-decoration: underline;
  }

  .footer-nav ul li a {
    color: var(--gold);
    font-weight: 500;
  }

  .footer-nav ul li a:hover {
    color: var(--gold-light);
  }
  
  .footer-bottom {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(211, 164, 58, 0.15);
  }
  
  .footer-copyright {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 15px;
  }
  
  .footer-legal {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  
  }

/* Better mobile buttons */
@media (max-width: 576px) {
  .btn {
    min-width: 140px;
    max-width: 200px;
    text-align: center;
    justify-content: center;
    margin: 5px 10px 5px 0;
    padding: 14px;
  }
  
  .hero .btn {
    margin-right: 10px;
  }
  
  .btn-row {
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
    justify-content: flex-start;
  }
  
  .cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background: rgba(10, 20, 15, 0.4);
    border: 1px solid rgba(211, 164, 58, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: 15px;
  }
  
  .cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
  }
  
  .cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  
  .cart-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 5px;
  }
  
  .cart-item-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
  }
  
  .cart-item-remove {
    color: #ff6b6b;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
  }
  
  .cart-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
  }
  
  .cart-quantity button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--gold);
    background: transparent;
    color: var(--gold);
    border-radius: 50%;
    font-size: 1.2rem;
  }
  
  .cart-quantity span {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
  }
}
