/* Handmade For Your Bundle - Main Stylesheet */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #b4ee7a;
    min-height: 100vh;
}

html, body { overflow-x: hidden; }

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

/* Header */
header {
    background: #fffacd;
    padding: 1rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
    padding-bottom: 0.65rem;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: center; /* center group as a whole */
  gap: 3rem;
  overflow: visible;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #228b22;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);    
    flex-shrink: 0;
}

.logo img, .logo-image {
  height: clamp(44px, 9vw, 70px); /* scales with viewport, prevents oversize */
  width: auto;
  max-width: 100%;
  display: block;
}

.logo-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo-text { /* enhance brand visibility */
  display: flex;
  flex-direction: column;
  line-height: 1;
  font-size: clamp(1.25rem, 4.5vw, 1.6rem); /* mobile -> small tablet */
  font-weight: 700;
  letter-spacing: 0.5px;
}

@media (min-width: 901px) {
  .logo-text { font-size: 2.05rem; letter-spacing: 0.75px; }
}

@media (min-width: 1400px) {
  .logo-text { font-size: 2.3rem; }
}

nav {
  flex: 1;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    justify-content: center;
}

nav a {
    color: #228b22;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    white-space: nowrap; /* prevent breaking like 'Diaper'\n'Cakes' */
}

nav a:hover {
    background: rgba(34, 139, 34, 0.1);
    transform: translateY(-2px);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 1101; /* ensure above off-canvas menu */
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #228b22;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Larger, clearer desktop menu */
@media (min-width: 901px) {
    nav ul { gap: 1.25rem; }
    nav a { font-size: 1.1rem; padding: 0.6rem 1rem; }
  header { padding: 1.25rem 0; }
    header .container { gap: 1.5rem; }
  .hamburger { display: none !important; }
}

/* Desktop wide: brand left, nav right */
@media (min-width: 1101px) {
    header .container { justify-content: center; gap: 2rem; }
    nav ul { justify-content: flex-end; }
}

/* Narrow desktop fit: tighten spacing so menu stays on one line */
@media (min-width: 1101px) and (max-width: 1280px) {
    header .container { gap: 1rem; }
    nav ul { gap: 1.1rem; }
    nav a { font-size: 1rem; padding: 0.6rem 0.9rem; }
    .logo-text { font-size: 1.9rem; }
}

/* Fine-tune spacing for very large screens */
@media (min-width: 1400px) {
    nav ul { gap: 2rem; }
  nav a { font-size: 1.2rem; }
}

/* Large tablets (e.g., 901–1100px): use hamburger to avoid overflow */
@media (min-width: 901px) and (max-width: 1100px) {
    .hamburger { display: flex !important; }
    header .container { justify-content: space-between; gap: 1.5rem; }
    nav ul {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: #fffacd;
        flex-direction: column;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        z-index: 1000;
    }
    nav ul.active { left: 0; }
    nav ul li { margin: 0.3rem 0; }
    nav a { display: block; }
}

/* Hero Section */
.hero {
    position: relative;
    text-align: center;
    padding: 4rem 0;
    /* background: linear-gradient(rgba(255, 252, 205, 0.85), rgba(228, 249, 212, 0.9)), url('./images/hero-bg.svg') center/cover no-repeat; */
    background-image: url('./images/hero-bg.svg');
    /* fallback color already set earlier */
    isolation: isolate; /* ensure blend layers don't leak */
}

.hero h1 {
    font-size: 3rem;
    color: #228b22;
    margin-bottom: 1rem;
    text-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.hero p {
    font-size: 1.2rem;
    color: #4a6741;
    max-width: 600px;
    margin: 0 auto 2rem;
    text-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.hero-cta {
    background: #ffffe0;
    color: #228b22;
    padding: 1rem 2rem;
    border: 2px solid #228b22;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-cta:hover {
    background: #228b22;
    color: #ffffe0;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Products Section */
.products {
    padding: 4rem 0;
}

.filters {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.filter-btn {
    background: #ffffe0;
    color: #228b22;
    border: 2px solid #228b22;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn[aria-selected="true"], .filter-btn:hover {
    background: #228b22;
    color: #ffffe0;
}

.hidden { display: none !important; }

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #228b22;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-title {
    color: #228b22;
    font-size: 1.6rem;
    margin: 2rem 0 1rem;
    text-align: left;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Keep single item same width as typical card and center it */
.products-grid.single-item {
        grid-template-columns: repeat(3, minmax(350px, 1fr));
        justify-content: start; /* left-align grid tracks */
        justify-items: stretch; /* card fills its track width */
}
.products-grid.single-item .product-card {
        width: 100%;            /* fill the single track width */
        max-width: none;        /* no cap beyond the track */
        grid-column: 1;         /* stay in the left-most column */
}

@media (max-width: 1100px) {
    .products-grid.single-item { grid-template-columns: repeat(2, minmax(350px, 1fr)); }
}

@media (max-width: 768px) {
    .products-grid.single-item { grid-template-columns: 1fr; }
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 300px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #228b22;
    position: relative;
    overflow: hidden;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transition: opacity 0.3s ease;
    padding-top: 12px; /* add breathing room above images */
    filter: brightness(1.15) contrast(1.05); /* brighten product images */
}

.product-image:hover img {
    opacity: 0.9;
}

.product-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(34, 139, 34, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, -10px) rotate(1deg); }
    66% { transform: translate(-5px, 5px) rotate(-1deg); }
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-description {
    color: #4a6741;
    margin-bottom: 1rem;
    line-height: 1.5;
    flex-grow: 1;
}

.product-price {
    font-size: 1.2rem;
    color: #228b22;
    font-weight: bold;
    margin-bottom: 1rem;
}

.customize-btn {
    background: #ffffe0;
    color: #228b22;
    border: 2px solid #228b22;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1rem;
    margin-top: auto;
}

.customize-btn:hover {
    background: #228b22;
    color: #ffffe0;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    background: #228b22;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #ffffe0;
    margin-bottom: 1rem;
}

.footer-section p, .footer-section a {
    color: #b4ee7a;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: block;
}

.footer-section a:hover {
    color: #ffffe0;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 2rem;
    color: #4a6741;
    font-size: 1.2rem;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #228b22;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Contact Section */
.contact {
    background: #b4ee7a;
    padding: 4rem 0;
}

.contact-intro {
    text-align: center;
    color: #4a6741;
    margin-bottom: 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.1);
    padding: 2rem;
}

.contact-section-title {
    color: #228b22;
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 2rem;
    margin-right: 1rem;
    color: #228b22;
}

.contact-details h4 {
    color: #4a6741;
    margin-bottom: 0.2rem;
}

.social-links h4 {
    color: #4a6741;
    margin-bottom: 0.5rem;
}

.social-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-btn {
    background: #ffffe0;
    color: #228b22;
    padding: 0.5rem 1rem;
    border: 2px solid #228b22;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.social-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.social-btn:hover {
    background: #228b22;
    color: #ffffe0;
}

/* Contact Form */
.contact-form-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.1);
    padding: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

label {
    color: #4a6741;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

input, select, textarea {
    padding: 0.7rem;
    border: 1px solid #228b22;
    border-radius: 8px;
    font-size: 1rem;
    background: #fffacd;
    color: #333;
    transition: border 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: #228b22;
    outline: none;
    box-shadow: 0 0 5px rgba(34, 139, 34, 0.3);
}

textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.submit-btn {
    background: #ffffe0;
    color: #228b22;
    border: 2px solid #228b22;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
}

.submit-btn:hover {
    background: #228b22;
    color: #ffffe0;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    margin-left: 0.5rem;
    display: none;
}

    .logo-image {        
        width: 75px;
        height: auto;
    }

/* Mobile header refinement */
@media (max-width: 768px) {
  /* Show company name; hide only the logo image on mobile */
  .logo { display: flex; }
  .logo img { display: none; }
  header .container {
    justify-content: flex-start; /* ensure left anchor */
    padding-left: calc( env(safe-area-inset-left, 0px) + 14px );
    padding-right: calc( env(safe-area-inset-right, 0px) + 10px );
  }
  .logo-text { font-size: clamp(1rem, 4.2vw, 1.25rem); }
}

/* Ultra-small devices: hide image to prevent cut-off */
@media (max-width: 340px) {
  .logo img { display: none; }
  .logo-text { font-size: 1.15rem; }
}

/* Optional class to force hide logo image (can be toggled if needed) */
/* .hide-logo-image .logo img { display:none; } */

/* Responsive Design */
/* Tablet breakpoint: use hamburger/off-canvas nav to avoid overflow on 769–900px */
@media (min-width: 769px) and (max-width: 900px) {
    .hamburger { display: flex; }
    header .container { justify-content: space-between; gap: 1.5rem; }
    nav ul {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: #fffacd;
        flex-direction: column;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        z-index: 1000;
    }
    nav ul.active { left: 0; }
    nav ul li { margin: 0.3rem 0; }
    nav a { display: block; }
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .hamburger {
        display: flex;
    }
    
    nav ul {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: #fffacd;
        flex-direction: column;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        z-index: 1000;
    }
    
    nav ul.active {
        left: 0;
    }
    
    nav ul li {
        margin: 0.3rem 0;
    }
    
    nav a {
        font-size: 1.1rem;
        padding: 0.8rem 2rem;
        display: block;
    }
    
    /* Make form rows stack on mobile */
    .form-row {
        flex-direction: column;
        gap: 1.2rem;
    }
    
    /* Adjust contact grid gap */
    .contact-grid {
        gap: 1.5rem;
    }
    
    /* Adjust contact info padding */
    .contact-info, .contact-form-container {
        padding: 1.5rem;
    }
    
    /* Stack social buttons vertically on very small screens */
    .social-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .social-btn {
        text-align: center;
    }
}

/* Extra small devices safeguard */
@media (max-width: 380px) {
  .logo img, .logo-image { height: 50px; }
  .logo-text { font-size: 1.1rem; }
}

/* Additional responsive breakpoint for very small screens */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .contact-info, .contact-form-container {
        padding: 1rem;
    }
    
    .contact-grid {
        gap: 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }        
    
    .logo-main {
        font-size: 1.4rem;
    }
    
    .logo-sub {
        font-size: 0.9rem;
    }
}
