/* ==========================================
   1. PREMIUM LIGHT THEME & SETUP
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5; 
    color: #0f1111; 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* THE FIX: The App Container now expands up to 1200px for desktop, 
   but stays 100% width on mobile. 
*/
.app-container {
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto; /* Centers the whole website on big screens */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   2. THE FLOATING PROFILE SQUARE
   ========================================== */
.floating-profile-square {
    background-color: #ffffff;
    /* On desktop, we don't want the profile box to stretch 1200px wide. 
       We lock it to 600px and center it so it always looks proportional. */
    max-width: 600px;
    width: calc(100% - 40px);
    margin: 30px auto; 
    padding: 30px 20px 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); 
    border: 1px solid #eaeaea;
}

.profile-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    display: block;
    border: 3px solid #ff9900; 
}

.logo-fallback {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #333;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 15px;
}

.social-icons a {
    color: #555;
    font-size: 26px;
    transition: all 0.2s ease;
}

.social-icons a:hover {
    color: #ff9900; 
    transform: scale(1.1);
}

.mini-disclosure {
    font-size: 11px;
    color: #767676;
    line-height: 1.4;
}

/* ==========================================
   3. FULL LENGTH SEARCH BAR
   ========================================== */
.search-section {
    position: sticky;
    top: 15px;
    z-index: 100;
    /* Centers the search bar and keeps it a readable width on desktop */
    max-width: 600px;
    width: calc(100% - 40px);
    margin: 0 auto 20px;
}

.search-box {
    position: relative;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

#search-bar {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 16px;
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.2s;
}

#search-bar:focus {
    border-color: #ff9900;
}

/* ==========================================
   4. PRODUCT GRID & FLOATING AMAZON CARDS
   ========================================== */
.store-content {
    padding: 0 20px 20px;
    flex-grow: 1;
}

/* THE RESPONSIVE GRID MAGIC 
   This automatically calculates how many columns can fit based on screen size!
*/
.grid-container {
    display: grid;
    /* Default for Mobile: 2 items side-by-side */
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px;
}

/* Tablet Layout (Screens larger than 768px) */
@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr); /* 3 items side-by-side */
        gap: 20px;
    }
}

/* Desktop Layout (Screens larger than 1024px) */
@media (min-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr); /* 4 items side-by-side */
        gap: 25px;
    }
    .profile-logo {
        width: 120px; /* Slightly larger logo on desktop */
        height: 120px;
    }
}

/* Premium Floating Animation */
@keyframes floatAnim {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

.product-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    border: 2px solid #ff9900; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    animation: floatAnim 4s ease-in-out infinite;
    transition: all 0.2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.product-card:active {
    transform: scale(0.96);
}

.product-img {
    width: 100%;
    height: 200px; /* Fixed height for the image area */
    object-fit: contain; /* THE SECRET: This fits the WHOLE image inside without cutting it */
    padding: 10px; /* Adds a little breathing room so the product doesn't touch the yellow border */
    background-color: #ffffff; /* Ensures the background behind the image is clean white */
}

.product-title {
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #0f1111;
    text-align: center;
    /* This handles long and short titles perfectly */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px; 
    overflow: hidden;
    line-height: 1.2;
}

/* The Amazon-style "Shop Now" Button */
.shop-btn {
    background-color: #ffd814; 
    color: #0f1111;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    padding: 8px;
    margin: 10px;
    border-radius: 20px; 
    border: 1px solid #fcd200;
    transition: background-color 0.2s;
}

.product-card:hover .shop-btn {
    background-color: #f7ca00; 
}

/* ==========================================
   5. FOOTER & LOADER
   ========================================== */
#scroll-trigger {
    padding: 40px 0;
    text-align: center;
    color: #666;
    grid-column: 1 / -1; /* Ensures loader stays perfectly centered under the grid */
}

.app-footer {
    text-align: center;
    padding: 30px 20px;
    font-size: 13px;
    color: #767676;
    margin-top: auto; /* Pushes footer to the very bottom */
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: #007185; 
    text-decoration: none;
    margin: 0 8px;
}

.footer-links a:hover {
    text-decoration: underline;
}
/* ==========================================
   6. SEARCH & COLLECTIONS FLEX LAYOUT
   ========================================== */
.search-container-flex {
    display: flex;
    gap: 10px; /* Space between search bar and button */
    width: 100%;
    align-items: center;
}

.search-container-flex .search-box {
    flex-grow: 1; /* Makes the search bar take up the remaining space */
}

.collections-btn {
    background-color: #ff9900;
    color: white;
    border-radius: 8px;
    width: 50px; /* Makes it a perfect square matching the search bar */
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(255,153,0,0.25);
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0; /* Prevents the button from getting squished */
}

.collections-btn:hover {
    background-color: #e68a00;
    transform: scale(1.05);
}