/*
Theme Name: Frutto Theme
Theme URI: https://frutto.com/
Author: Frutto Team
Author URI: https://frutto.com/
Description: A custom, highly optimized e-commerce theme built for the Frutto computer hardware store, fully integrated with WooCommerce.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: frutto-theme
*/

/* Core Design System */
:root {
    --primary: #f48c06; /* Vibrant Orange from new logo */
    --primary-hover: #e07b00;
    --secondary: #591398; /* Purple from new logo */
    --secondary-hover: #450c7a;
    --background: #fdfbf7; /* Very light warm background */
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --muted: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px; /* Bubbly feel */
    --font-main: 'Cairo', sans-serif;
    --container-width: 1280px;
}

body {
    font-family: var(--font-main);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
}

*, *::before, *::after {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

h1, h2, h3, h4, h5, h6 {
    color: var(--secondary);
    margin: 0 0 16px 0;
    font-weight: 800; /* Bubbly/Thick feel */
}

.fr-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 16px;
}

/* Buttons */
.fr-btn, .button, button, input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--primary);
    color: #fff !important;
    border-radius: var(--radius-lg); /* bubbly */
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    gap: 8px;
    font-family: var(--font-main);
    box-shadow: 0 4px 0 #cc7400; /* 3D effect like logo */
}

.fr-btn:hover, .button:hover, button:hover, input[type="submit"]:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #cc7400;
}

.fr-btn:active, .button:active, button:active, input[type="submit"]:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #cc7400;
}

.fr-btn-outline {
    background: transparent;
    color: var(--secondary) !important;
    border: 2px solid var(--secondary);
    box-shadow: 0 4px 0 var(--secondary-hover);
}

.fr-btn-outline:hover {
    background: var(--secondary);
    color: #fff !important;
}

/* Header */
.fr-header {
    background: var(--secondary);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(89, 19, 152, 0.3);
}

.fr-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
}

.fr-logo img {
    height: 60px;
    object-fit: contain;
    transition: transform 0.3s;
}

.fr-logo img:hover {
    transform: scale(1.05) rotate(-2deg);
}

/* Desktop Menu */
.fr-nav-desktop ul {
    display: flex;
    gap: 32px;
}

.fr-nav-desktop li {
    position: relative;
}

.fr-nav-desktop a {
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    padding: 10px 0;
}

.fr-nav-desktop a:hover, .fr-nav-desktop .current-menu-item > a {
    color: var(--primary);
}

.fr-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fr-icon-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    background: #fff;
    transition: all 0.3s;
    position: relative;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 4px 0 rgba(0,0,0,0.1);
}

.fr-icon-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0,0,0,0.1);
}

.fr-icon-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.1);
}

.fr-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--secondary);
}

.fr-mobile-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: #fff;
}

/* Page Hero Default */
.fr-page-hero {
    background: var(--secondary);
    color: #fff;
    padding: 60px 0 80px;
    text-align: center;
    border-bottom-left-radius: 50% 20px;
    border-bottom-right-radius: 50% 20px;
    margin-bottom: 60px;
}

.fr-page-hero h1 {
    color: #fff;
    font-size: 40px;
    margin-bottom: 16px;
}

.fr-page-hero p {
    font-size: 18px;
    color: #e2e8f0;
    max-width: 600px;
    margin: 0 auto;
}

/* Sections */
.fr-section {
    padding: 60px 0;
}

.fr-section-title {
    text-align: center;
    margin-bottom: 48px;
}

.fr-section-title h2 {
    font-size: 36px;
    display: inline-block;
    position: relative;
    color: var(--secondary);
}

.fr-section-title h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background: var(--primary);
    border-radius: 3px;
}

/* Footer */
.fr-footer {
    background: var(--secondary);
    color: #fff;
    padding: 80px 0 20px;
    margin-top: 80px;
    border-top-left-radius: 50% 20px;
    border-top-right-radius: 50% 20px;
}

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

.fr-footer-col h4 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}

.fr-footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.fr-footer-col p { color: #e2e8f0; margin-bottom: 16px; }
.fr-footer-col ul li { margin-bottom: 12px; }
.fr-footer-col a { color: #e2e8f0; transition: 0.2s; }
.fr-footer-col a:hover { color: var(--primary); padding-right: 5px; }

.fr-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e2e8f0;
    margin-bottom: 16px;
}

.fr-contact-item i {
    color: var(--primary);
    font-size: 20px;
}

.fr-footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #cbd5e1;
    font-size: 15px;
}

/* Floating WhatsApp */
.fr-whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 65px;
    height: 65px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fr-whatsapp-float:hover {
    transform: scale(1.15);
    color: #fff;
}

/* WooCommerce Overrides */
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.3s;
    text-align: center;
    box-shadow: 0 4px 0 rgba(0,0,0,0.02);
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 0 rgba(244, 140, 6, 0.2);
}

.woocommerce ul.products li.product img {
    margin-bottom: 20px;
    border-radius: var(--radius-md);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--font-main);
    font-size: 18px;
    color: var(--secondary);
    font-weight: 700;
}

.woocommerce ul.products li.product .price {
    color: var(--primary);
    font-size: 20px;
    font-weight: 800;
}

.woocommerce ul.products li.product .button {
    margin-top: 15px;
    width: 100%;
}

.woocommerce span.onsale {
    background-color: var(--primary);
    padding: 5px 10px;
    border-radius: var(--radius-md);
    min-width: auto;
    min-height: auto;
    font-weight: 700;
    line-height: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .fr-nav-desktop { display: none; }
    .fr-mobile-toggle { display: block; }
    .fr-header-inner { height: 70px; }
}

/* Mobile Nav Styles */
.fr-mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--surface);
    box-shadow: -2px 0 20px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: right 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.fr-mobile-nav.open {
    right: 0;
}

.fr-mobile-nav-close {
    align-self: flex-end;
    font-size: 28px;
    cursor: pointer;
    margin-bottom: 24px;
    color: var(--secondary);
    transition: 0.2s;
}

.fr-mobile-nav-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.fr-mobile-nav ul {
    display: flex;
    flex-direction: column;
}

.fr-mobile-nav ul li a {
    display: block;
    padding: 16px 0;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 2px dashed var(--border);
    color: var(--secondary);
}

.fr-mobile-nav ul li a:hover {
    color: var(--primary);
    padding-right: 10px;
}
