/* TechDroid Website Builder - Main Stylesheet */

/* ================================================
   CSS Reset & Base
   ================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    line-height: 1.6;
    min-height: 100vh;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

button {
    font: inherit;
    cursor: pointer;
    background: none;
    border: none;
}

input, textarea, select {
    font: inherit;
}

/* ================================================
   Typography
   ================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1rem, 2vw, 1.25rem); }

p {
    margin-bottom: 1rem;
}

.text-muted {
    color: var(--color-text-muted);
}

/* ================================================
   Layout
   ================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ================================================
   Header - Base Styles
   ================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-surface);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, box-shadow 0.3s, color 0.3s;
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo img {
    max-height: 48px;
    width: auto;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

/* Navigation */
.main-nav {
    display: none;
}

@media (min-width: 768px) {
    .main-nav {
        display: block;
    }
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-item a {
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.2s;
    padding: 0.5rem 0;
    position: relative;
}

.nav-item a:hover,
.nav-item.active a {
    color: var(--color-primary);
}

.nav-item.active a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--color-primary);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    transition: transform 0.3s, opacity 0.3s;
}

/* Header CTA Button */
.header-cta {
    display: none;
    margin-left: 1.5rem;
}

@media (min-width: 768px) {
    .header-cta {
        display: block;
    }
}

.header-cta .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

/* Header Icon Links (Account, Cart) */
.header-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    text-decoration: none;
    padding: 0.4rem;
    border-radius: 50%;
    transition: color 0.2s, background-color 0.2s;
    position: relative;
}

.header-icon-link:hover {
    color: var(--color-primary);
    background-color: rgba(0,0,0,0.05);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.cart-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    border: 2px solid var(--color-surface, #fff);
}

/* ================================================
   Header Style: Transparent
   ================================================ */
.site-header.transparent {
    position: fixed;
    width: 100%;
    background-color: transparent;
    border-bottom: none;
}

.site-header.transparent .site-title,
.site-header.transparent .nav-item a,
.site-header.transparent .mobile-menu-toggle span {
    color: #ffffff;
}

.site-header.transparent .nav-item a:hover,
.site-header.transparent .nav-item.active a {
    color: #ffffff;
    opacity: 1;
}

.site-header.transparent .nav-item a {
    opacity: 0.9;
}

.site-header.transparent.scrolled {
    background-color: var(--color-surface);
}

.site-header.transparent.scrolled .site-title,
.site-header.transparent.scrolled .nav-item a,
.site-header.transparent.scrolled .mobile-menu-toggle span {
    color: var(--color-text);
}

.site-header.transparent.scrolled .nav-item a {
    opacity: 1;
    color: var(--color-text-muted);
}

.site-header.transparent.scrolled .nav-item a:hover,
.site-header.transparent.scrolled .nav-item.active a {
    color: var(--color-primary);
}

/* ================================================
   Header Style: Centered
   ================================================ */
.site-header.centered .header-container {
    flex-direction: column;
    padding: 1.5rem;
}

.site-header.centered .site-logo {
    margin-bottom: 1rem;
}

.site-header.centered .site-title {
    font-size: 2rem;
    letter-spacing: 2px;
}

.site-header.centered .main-nav {
    order: 2;
}

.site-header.centered .nav-list {
    justify-content: center;
}

.site-header.centered .mobile-menu-toggle {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

/* ================================================
   Header Style: Dark
   ================================================ */
.site-header.dark {
    background-color: #1f2937;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.site-header.dark .site-title {
    color: #ffffff;
}

.site-header.dark .nav-item a {
    color: rgba(255, 255, 255, 0.8);
}

.site-header.dark .nav-item a:hover,
.site-header.dark .nav-item.active a {
    color: #ffffff;
}

.site-header.dark .nav-item.active a::after {
    background-color: var(--color-primary);
}

.site-header.dark .mobile-menu-toggle span {
    background-color: #ffffff;
}

.site-header.dark.scrolled {
    background-color: #111827;
}

/* ================================================
   Header Style: Minimal
   ================================================ */
.site-header.minimal {
    background-color: transparent;
    border-bottom: none;
    position: fixed;
    width: 100%;
}

.site-header.minimal .main-nav {
    display: none !important;
}

.site-header.minimal .mobile-menu-toggle {
    display: flex;
}

.site-header.minimal .site-title {
    color: var(--color-text);
}

.site-header.minimal.scrolled {
    background-color: var(--color-surface);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* ================================================
   Header Style: Split (Logo left, Nav center, CTA right)
   ================================================ */
.site-header.split .header-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.site-header.split .site-logo {
    justify-self: start;
}

.site-header.split .main-nav {
    justify-self: center;
}

.site-header.split .header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ================================================
   Header Style: Boxed
   ================================================ */
.site-header.boxed {
    background-color: transparent;
    border-bottom: none;
    padding: 1rem 0;
}

.site-header.boxed .header-container {
    background-color: var(--color-surface);
    border-radius: 100px;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.site-header.boxed .nav-list {
    gap: 1.5rem;
}

.site-header.boxed .nav-item a {
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

.site-header.boxed .nav-item.active a {
    background-color: var(--color-primary);
    color: #ffffff;
}

.site-header.boxed .nav-item.active a::after {
    display: none;
}

/* ================================================
   Header Style: Elegant (for Fashion)
   ================================================ */
.site-header.elegant {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.site-header.elegant .header-container {
    padding: 1.25rem 1.5rem;
}

.site-header.elegant .site-title {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.site-header.elegant .nav-list {
    gap: 2.5rem;
}

.site-header.elegant .nav-item a {
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.site-header.elegant .nav-item.active a::after {
    height: 1px;
}

/* ================================================
   Buttons
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--color-surface);
    color: var(--color-text);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ================================================
   Sections
   ================================================ */
.section {
    padding: 4rem 0;
}

.section-sm {
    padding: 2rem 0;
}

.section-lg {
    padding: 6rem 0;
}

/* ================================================
   Hero Section
   ================================================ */
.section-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    background-size: cover;
    background-position: center;
    text-align: center;
}

.section-hero .overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
}

.section-hero .content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

.section-hero h1 {
    color: white;
    margin-bottom: 1rem;
}

.section-hero .subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* ================================================
   Cards
   ================================================ */
.card {
    background-color: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* ================================================
   Product Grid
   ================================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.product-image {
    aspect-ratio: 1;
    overflow: hidden;
    background-color: #f0f0f0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1rem;
}

.product-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.product-price-old {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

/* ================================================
   Deals Banner
   ================================================ */
.deals-banner {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.deals-badge {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* ================================================
   Footer
   ================================================ */
.site-footer {
    background-color: var(--color-surface);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.footer-section p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-contact {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-contact li {
    margin-bottom: 0.5rem;
}

.footer-contact a:hover {
    color: var(--color-primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--color-text-muted);
    transition: all 0.2s;
}

.social-links a:hover {
    background-color: var(--color-primary);
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.powered-by a {
    color: var(--color-primary);
}

/* ================================================
   WhatsApp Float Button
   ================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 99;
    transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

/* ================================================
   Forms
   ================================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background-color: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ================================================
   Dark Mode Adjustments
   ================================================ */
.dark-mode .site-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .card,
.dark-mode .product-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dark-mode .footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .social-links a {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .form-input,
.dark-mode .form-textarea {
    border-color: rgba(255, 255, 255, 0.1);
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 767px) {
    .section {
        padding: 3rem 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ================================================
   Animations
   ================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}
