/*
Theme Name: FreezeDry
Theme URI: https://prstrade.com
Author: PRS TRADE LIMITED
Author URI: https://prstrade.com
Description: A B2B WordPress theme for FreezeDry, specializing in freeze-dried fruits and snacks. Features inquiry-based lead generation with modern green and red branding.
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: freezedry
Tags: woocommerce, e-commerce, full-site-editing, block-patterns, custom-colors, custom-logo
*/

/* ==========================================================================
   CSS Variables - Brand Colors
   ========================================================================== */
:root {
    --fd-primary: #2E7D32;
    --fd-primary-dark: #1B5E20;
    --fd-primary-light: #4CAF50;
    --fd-secondary: #C62828;
    --fd-secondary-dark: #B71C1C;
    --fd-secondary-light: #EF5350;
    --fd-white: #FFFFFF;
    --fd-black: #1A1A1A;
    --fd-gray-100: #F5F5F5;
    --fd-gray-200: #EEEEEE;
    --fd-gray-300: #E0E0E0;
    --fd-gray-600: #757575;
    --fd-gray-800: #424242;
    --fd-success: #43A047;
    --fd-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --fd-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --fd-radius: 12px;
    --fd-radius-sm: 8px;
    --fd-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Global Styles
   ========================================================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--fd-black);
    line-height: 1.6;
    background: var(--fd-white);
}

a {
    color: var(--fd-primary);
    text-decoration: none;
    transition: var(--fd-transition);
}

a:hover {
    color: var(--fd-primary-dark);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--fd-black);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.fd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--fd-radius);
    cursor: pointer;
    transition: var(--fd-transition);
    text-decoration: none;
}

.fd-btn-primary {
    background: linear-gradient(135deg, var(--fd-primary) 0%, var(--fd-primary-dark) 100%);
    color: var(--fd-white);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.fd-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(46, 125, 50, 0.4);
    color: var(--fd-white);
}

.fd-btn-secondary {
    background: linear-gradient(135deg, var(--fd-secondary) 0%, var(--fd-secondary-dark) 100%);
    color: var(--fd-white);
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.3);
}

.fd-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(198, 40, 40, 0.4);
    color: var(--fd-white);
}

.fd-btn-outline {
    background: transparent;
    border: 2px solid var(--fd-primary);
    color: var(--fd-primary);
}

.fd-btn-outline:hover {
    background: var(--fd-primary);
    color: var(--fd-white);
}

/* ==========================================================================
   Header Styles
   ========================================================================== */
.fd-header {
    background: var(--fd-white);
    box-shadow: var(--fd-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.fd-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fd-logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--fd-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.fd-logo span {
    color: var(--fd-secondary);
}

.fd-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.fd-nav a {
    font-weight: 500;
    color: var(--fd-gray-800);
    padding: 8px 0;
    position: relative;
}

.fd-nav a:hover {
    color: var(--fd-primary);
}

.fd-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--fd-primary);
    transition: var(--fd-transition);
}

.fd-nav a:hover::after {
    width: 100%;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */
.fd-footer {
    background: linear-gradient(135deg, var(--fd-black) 0%, #2d2d2d 100%);
    color: var(--fd-white);
    padding: 60px 30px 30px;
}

.fd-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.fd-footer-section h4 {
    color: var(--fd-white);
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.fd-footer-section p,
.fd-footer-section a {
    color: var(--fd-gray-300);
    margin-bottom: 10px;
    display: block;
}

.fd-footer-section a:hover {
    color: var(--fd-primary-light);
}

.fd-footer-brand {
    font-size: 0.875rem;
    color: var(--fd-gray-600);
    margin-top: 10px;
}

.fd-footer-bottom {
    max-width: 1400px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--fd-gray-600);
    font-size: 0.875rem;
}

.fd-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.fd-contact-item svg {
    width: 20px;
    height: 20px;
    fill: var(--fd-primary-light);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.fd-hero {
    background: linear-gradient(135deg, var(--fd-primary) 0%, var(--fd-primary-dark) 50%, var(--fd-secondary-dark) 100%);
    color: var(--fd-white);
    padding: 100px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.fd-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, 20px) rotate(180deg); }
}

.fd-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.fd-hero h1 {
    color: var(--fd-white);
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.fd-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* ==========================================================================
   Products Grid
   ========================================================================== */
.fd-products {
    padding: 80px 30px;
    background: var(--fd-gray-100);
}

.fd-products-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.fd-section-title {
    text-align: center;
    margin-bottom: 50px;
}

.fd-section-title h2 {
    color: var(--fd-primary);
    margin-bottom: 10px;
}

.fd-section-title p {
    color: var(--fd-gray-600);
    font-size: 1.125rem;
}

.fd-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* ==========================================================================
   Product Card
   ========================================================================== */
.fd-product-card {
    background: var(--fd-white);
    border-radius: var(--fd-radius);
    overflow: hidden;
    box-shadow: var(--fd-shadow);
    transition: var(--fd-transition);
}

.fd-product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--fd-shadow-lg);
}

.fd-product-image {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.fd-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--fd-transition);
}

.fd-product-card:hover .fd-product-image img {
    transform: scale(1.05);
}

.fd-product-info {
    padding: 25px;
}

.fd-product-info h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.fd-product-info p {
    color: var(--fd-gray-600);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* ==========================================================================
   WooCommerce Overrides
   ========================================================================== */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce div.product form.cart .button,
.single_add_to_cart_button,
.woocommerce a.button,
.woocommerce button.button {
    display: none !important;
}

.fd-inquiry-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--fd-primary) 0%, var(--fd-primary-dark) 100%);
    color: var(--fd-white) !important;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--fd-radius);
    cursor: pointer;
    transition: var(--fd-transition);
    text-decoration: none;
}

.fd-inquiry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(46, 125, 50, 0.4);
    color: var(--fd-white) !important;
}

.fd-inquiry-btn svg {
    width: 18px;
    height: 18px;
}

/* WooCommerce Product Styling */
.woocommerce ul.products li.product {
    background: var(--fd-white);
    border-radius: var(--fd-radius);
    overflow: hidden;
    box-shadow: var(--fd-shadow);
    transition: var(--fd-transition);
    padding: 0;
    margin-bottom: 30px;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: var(--fd-shadow-lg);
}

.woocommerce ul.products li.product a img {
    margin: 0;
    border-radius: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: 15px 20px 5px;
    font-size: 1.125rem;
}

.woocommerce ul.products li.product .price {
    display: none;
}

.woocommerce ul.products li.product .fd-inquiry-btn {
    margin: 15px 20px 20px;
    width: calc(100% - 40px);
}

/* Single Product Page */
.woocommerce div.product {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 30px;
}

.woocommerce div.product div.images {
    border-radius: var(--fd-radius);
    overflow: hidden;
    box-shadow: var(--fd-shadow);
}

.woocommerce div.product .product_title {
    color: var(--fd-primary);
    font-size: 2.5rem;
}

.woocommerce div.product p.price {
    display: none;
}

.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 1.125rem;
    color: var(--fd-gray-600);
    margin-bottom: 30px;
}

/* ==========================================================================
   Inquiry Popup Modal
   ========================================================================== */
.fd-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fd-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.fd-modal {
    background: var(--fd-white);
    border-radius: var(--fd-radius);
    box-shadow: var(--fd-shadow-lg);
    width: 90%;
    max-width: 480px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.fd-modal-overlay.active .fd-modal {
    transform: scale(1) translateY(0);
}

.fd-modal-header {
    background: linear-gradient(135deg, var(--fd-primary) 0%, var(--fd-primary-dark) 100%);
    color: var(--fd-white);
    padding: 25px 30px;
    position: relative;
}

.fd-modal-header h3 {
    color: var(--fd-white);
    font-size: 1.5rem;
    margin: 0;
}

.fd-modal-header p {
    opacity: 0.9;
    margin: 8px 0 0;
    font-size: 0.95rem;
}

.fd-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: var(--fd-white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--fd-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fd-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.fd-modal-body {
    padding: 30px;
}

.fd-form-group {
    margin-bottom: 20px;
}

.fd-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--fd-black);
}

.fd-form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--fd-gray-300);
    border-radius: var(--fd-radius-sm);
    font-size: 1rem;
    transition: var(--fd-transition);
}

.fd-form-group input:focus {
    outline: none;
    border-color: var(--fd-primary);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1);
}

.fd-form-group input::placeholder {
    color: var(--fd-gray-600);
}

.fd-product-name {
    background: var(--fd-gray-100);
    padding: 15px 20px;
    border-radius: var(--fd-radius-sm);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fd-product-name svg {
    width: 20px;
    height: 20px;
    fill: var(--fd-primary);
}

.fd-product-name span {
    font-weight: 600;
    color: var(--fd-primary);
}

.fd-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--fd-secondary) 0%, var(--fd-secondary-dark) 100%);
    color: var(--fd-white);
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--fd-radius);
    cursor: pointer;
    transition: var(--fd-transition);
}

.fd-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(198, 40, 40, 0.4);
}

.fd-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Success State */
.fd-modal-success {
    display: none;
    text-align: center;
    padding: 40px 30px;
}

.fd-modal-success.active {
    display: block;
}

.fd-modal-form.hidden {
    display: none;
}

.fd-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--fd-success) 0%, var(--fd-primary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.fd-success-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--fd-white);
}

.fd-modal-success h3 {
    color: var(--fd-primary);
    font-size: 1.75rem;
    margin-bottom: 15px;
}

.fd-modal-success p {
    color: var(--fd-gray-600);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.fd-close-success-btn {
    padding: 12px 30px;
    background: var(--fd-gray-200);
    color: var(--fd-gray-800);
    font-weight: 600;
    border: none;
    border-radius: var(--fd-radius);
    cursor: pointer;
    transition: var(--fd-transition);
}

.fd-close-success-btn:hover {
    background: var(--fd-gray-300);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .fd-header-inner {
        flex-direction: column;
        gap: 15px;
    }
    
    .fd-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .fd-hero h1 {
        font-size: 2.5rem;
    }
    
    .fd-hero p {
        font-size: 1.1rem;
    }
    
    .fd-footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .fd-contact-item {
        justify-content: center;
    }
    
    .fd-modal {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
}
