/*
Theme Name: Temu Finds
Theme URI: https://temu.com
Description: Lightweight custom branded theme with Temu affiliate links.
Author: Custom
Version: 1.1
License: GPLv2 or later
*/

/* ========================================
   RESET & BASE STYLES
======================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #ff6b35;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ========================================
   HEADER STYLES
======================================== */

.site-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.site-branding {
    flex: 0 0 auto;
}

.site-title {
    margin: 0 0 5px 0;
    font-size: 1.8rem;
    color: #ff6b35;
}

.site-title a {
    color: #ff6b35;
    text-decoration: none;
}

.site-description {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.custom-logo-link img {
    max-height: 60px;
    width: auto;
}

.main-navigation {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
}

.nav-menu a:hover {
    color: #ff6b35;
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.menu-icon {
    display: block;
    width: 25px;
    height: 2px;
    background: #333;
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background: #333;
    left: 0;
    transition: 0.3s;
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    top: 8px;
}

.header-search {
    flex: 0 0 auto;
}

.header-search form {
    display: flex;
    gap: 5px;
}

.header-search input[type="search"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
}

.header-search button {
    padding: 8px 16px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* ========================================
   MAIN CONTENT AREA
======================================== */

main {
    min-height: calc(100vh - 200px);
}

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

.temu-finds-page {
    padding: 40px 20px;
}

.page-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #333;
    font-weight: 700;
}

.page-description {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

/* ========================================
   PRODUCTS GRID
======================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(255,107,53,0.2);
    border-color: #ff6b35;
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    background: #fff;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 400px;
}

.product-image {
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.02);
}

.product-info {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    display: none; /* Hide title - already in Temu image */
}

.product-description {
    display: none; /* Hide description */
}

.product-rating {
    display: none; /* Hide rating - already in Temu image */
}

.product-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stars {
    color: #ffa41c;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.rating-value {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

.shop-now-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255,107,53,0.2);
}

.product-card:hover .shop-now-btn {
    background: linear-gradient(135deg, #e85a28 0%, #ff6b35 100%);
    box-shadow: 0 4px 12px rgba(255,107,53,0.4);
    transform: translateX(2px);
}

.shop-now-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.product-card:hover .shop-now-btn svg {
    transform: translateX(3px);
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

/* ========================================
   FOOTER STYLES
======================================== */

.site-footer {
    background: #333;
    color: #fff;
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.site-footer .container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #555;
}

.footer-widget h3 {
    color: #ff6b35;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-widget p {
    color: #ccc;
    line-height: 1.6;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: #ff6b35;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    color: #ccc;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #444;
    border-radius: 50%;
}

.social-links a:hover {
    color: #ff6b35;
    background: #555;
}

.footer-bottom {
    text-align: center;
}

.footer-info p {
    margin: 10px 0;
    color: #ccc;
}

.footer-info a {
    color: #ff6b35;
    text-decoration: none;
}

.footer-info a:hover {
    color: #ffa41c;
    text-decoration: underline;
}

.copyright {
    font-size: 0.9rem;
}

.affiliate-disclosure {
    font-size: 0.85rem;
    color: #999;
    margin-top: 15px;
}

/* ========================================
   SIDEBAR
======================================== */

.sidebar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #ff6b35;
    padding-bottom: 10px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

/* ========================================
   BUTTONS & FORMS
======================================== */

button,
.button,
input[type="submit"] {
    background: #ff6b35;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 1rem;
}

button:hover,
.button:hover,
input[type="submit"]:hover {
    background: #e85a28;
    text-decoration: none;
}

input[type="text"],
input[type="email"],
input[type="search"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #ff6b35;
}

/* ========================================
   UTILITY CLASSES
======================================== */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .header-wrapper {
        flex-wrap: wrap;
    }
    
    .menu-toggle {
        display: block;
        order: 3;
    }
    
    .site-branding {
        order: 1;
        flex: 1 1 auto;
    }
    
    .header-search {
        order: 2;
    }
    
    .main-navigation {
        order: 4;
        flex: 1 1 100%;
        display: none;
    }
    
    .main-navigation.toggled {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px 0;
    }
    
    .header-search input[type="search"] {
        width: 150px;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .product-image-wrapper {
        max-height: none;
        min-height: auto;
    }
    
    .product-card {
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
    
    .product-info {
        padding: 6px;
    }
}

/* ========================================
   WORDPRESS SPECIFIC
======================================== */

.alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
}

.alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 10px;
}

.aligncenter {
    display: block;
    margin: 0 auto 20px;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    padding: 5px;
}

/* ========================================
   LOADING & ANIMATIONS
======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.5s ease-out;
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #e85a28;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.site-header.scroll-down {
    transform: translateY(-100%);
}

.site-header.scroll-up {
    transform: translateY(0);
}

.site-header {
    transition: transform 0.3s ease;
}

/* ========================================
   ACCESSIBILITY
======================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

:focus {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #ff6b35;
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}
