/**
 * SES ICT HUB Enhancements - Frontend Styles
 * Mobile-first, lightweight CSS
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --ses-primary: #25D366;
    --ses-primary-dark: #128C7E;
    --ses-text: #333333;
    --ses-text-light: #666666;
    --ses-bg: #ffffff;
    --ses-bg-light: #f5f5f5;
    --ses-border: #e0e0e0;
    --ses-accent: #007cba;
    --ses-success: #28a745;
    --ses-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --ses-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
    --ses-radius: 4px;
    --ses-radius-lg: 8px;
    --ses-transition: 0.3s ease;
    --ses-announcement-height: 36px;
    --ses-sticky-cta-height: 64px;
    --ses-whatsapp-size: 56px;
}

/* ============================================
   Announcement Strip
   ============================================ */
.sesicthub-announcement-strip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background: var(--ses-text);
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    min-height: var(--ses-announcement-height);
}

.sesicthub-announcement-strip.has-admin-bar {
    top: 32px;
}

.sesicthub-announcement-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 16px;
    position: relative;
}

.sesicthub-announcement-content {
    text-align: center;
    flex: 1;
}

.sesicthub-announcement-message {
    display: none;
    animation: sesFadeIn 0.4s ease;
}

.sesicthub-announcement-message.is-active {
    display: block;
}

.sesicthub-announcement-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    margin-left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--ses-transition);
}

.sesicthub-announcement-close:hover {
    color: #fff;
}

/* Offset body for announcement strip */
body {
    padding-top: var(--ses-announcement-height);
}

body.admin-bar {
    padding-top: calc(var(--ses-announcement-height) + 32px);
}

/* Mobile admin bar adjustment */
@media screen and (max-width: 782px) {
    .sesicthub-announcement-strip.has-admin-bar {
        top: 46px;
    }
    
    body.admin-bar {
        padding-top: calc(var(--ses-announcement-height) + 46px);
    }
}

@keyframes sesFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   WhatsApp Floating Button
   ============================================ */
.sesicthub-whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999998;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--ses-primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--ses-shadow-lg);
    transition: all var(--ses-transition);
}

.sesicthub-whatsapp-float:hover {
    background: var(--ses-primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.sesicthub-whatsapp-float.off-hours {
    background: var(--ses-text-light);
}

.sesicthub-whatsapp-float.off-hours:hover {
    background: var(--ses-text);
    box-shadow: var(--ses-shadow-lg);
}

.sesicthub-whatsapp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sesicthub-whatsapp-label {
    white-space: nowrap;
}

/* Mobile WhatsApp button */
@media screen and (max-width: 768px) {
    .sesicthub-whatsapp-float {
        bottom: calc(var(--ses-sticky-cta-height) + 16px);
        right: 16px;
        padding: 12px 16px;
        font-size: 13px;
    }
    
    /* Hide label on very small screens if sticky CTA is present */
    .sesicthub-sticky-cta + .sesicthub-whatsapp-float .sesicthub-whatsapp-label {
        display: none;
    }
    
    .sesicthub-sticky-cta + .sesicthub-whatsapp-float {
        padding: 14px;
        border-radius: 50%;
    }
}

/* ============================================
   Mobile Sticky CTA
   ============================================ */
.sesicthub-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999997;
    background: var(--ses-bg);
    border-top: 1px solid var(--ses-border);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

@media screen and (max-width: 768px) {
    .sesicthub-sticky-cta {
        display: block;
    }
    
    /* Add padding to body for sticky CTA */
    body.single-product {
        padding-bottom: var(--ses-sticky-cta-height);
    }
}

.sesicthub-sticky-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    max-width: 600px;
    margin: 0 auto;
    gap: 16px;
}

.sesicthub-sticky-cta-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--ses-text);
}

.sesicthub-sticky-cta-price .woocommerce-Price-amount {
    color: var(--ses-success);
}

.sesicthub-sticky-cta-price del {
    color: var(--ses-text-light);
    font-size: 14px;
    margin-right: 6px;
}

.sesicthub-sticky-cta-actions {
    display: flex;
    gap: 8px;
}

.sesicthub-sticky-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--ses-radius);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--ses-transition);
    white-space: nowrap;
}

.sesicthub-sticky-cta-add-to-cart,
.sesicthub-sticky-cta-select-options {
    background: var(--ses-accent);
    color: #fff;
}

.sesicthub-sticky-cta-add-to-cart:hover,
.sesicthub-sticky-cta-select-options:hover {
    background: #005a87;
    color: #fff;
}

.sesicthub-sticky-cta-whatsapp {
    background: var(--ses-primary);
    color: #fff;
}

.sesicthub-sticky-cta-whatsapp:hover {
    background: var(--ses-primary-dark);
    color: #fff;
}

/* Loading state */
.sesicthub-sticky-cta-add-to-cart.loading .sesicthub-cta-button-text {
    opacity: 0.6;
}

.sesicthub-cta-button-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sesSpin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes sesSpin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Product Trust Box
   ============================================ */
.sesicthub-trust-box {
    margin: 20px 0;
    padding: 20px;
    background: var(--ses-bg-light);
    border-radius: var(--ses-radius-lg);
    border: 1px solid var(--ses-border);
}

.sesicthub-trust-box-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--ses-text);
}

.sesicthub-trust-box-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sesicthub-trust-box-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ses-border);
}

.sesicthub-trust-box-item:last-child {
    border-bottom: none;
}

.sesicthub-trust-box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: var(--ses-accent);
    color: #fff;
    border-radius: 50%;
}

.sesicthub-trust-box-text {
    font-size: 14px;
    color: var(--ses-text-light);
    line-height: 1.5;
}

/* ============================================
   Landing Page Styles
   ============================================ */

/* Hero Section */
.sesicthub-landing-hero {
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--ses-bg-light) 0%, #fff 100%);
}

.sesicthub-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media screen and (min-width: 768px) {
    .sesicthub-hero-container {
        grid-template-columns: 1fr 1fr;
    }
}

.sesicthub-hero-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 16px;
    color: var(--ses-text);
}

@media screen and (min-width: 768px) {
    .sesicthub-hero-title {
        font-size: 36px;
    }
}

.sesicthub-hero-subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: var(--ses-text-light);
    margin: 0 0 24px;
}

.sesicthub-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sesicthub-hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--ses-radius);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--ses-transition);
}

.sesicthub-hero-button-primary {
    background: var(--ses-accent);
    color: #fff;
}

.sesicthub-hero-button-primary:hover {
    background: #005a87;
    color: #fff;
}

.sesicthub-hero-button-secondary {
    background: var(--ses-primary);
    color: #fff;
}

.sesicthub-hero-button-secondary:hover {
    background: var(--ses-primary-dark);
    color: #fff;
}

.sesicthub-hero-image {
    text-align: center;
}

.sesicthub-hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--ses-radius-lg);
    box-shadow: var(--ses-shadow-lg);
}

/* Section Container */
.sesicthub-section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sesicthub-section-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 32px;
    color: var(--ses-text);
}

@media screen and (min-width: 768px) {
    .sesicthub-section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }
}

/* Products Section */
.sesicthub-landing-products {
    padding: 60px 0;
    background: var(--ses-bg);
}

.sesicthub-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media screen and (min-width: 768px) {
    .sesicthub-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media screen and (min-width: 1024px) {
    .sesicthub-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.sesicthub-product-card {
    background: var(--ses-bg);
    border: 1px solid var(--ses-border);
    border-radius: var(--ses-radius-lg);
    overflow: hidden;
    transition: box-shadow var(--ses-transition);
}

.sesicthub-product-card:hover {
    box-shadow: var(--ses-shadow-lg);
}

.sesicthub-product-image-link {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--ses-bg-light);
}

.sesicthub-product-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ses-transition);
}

.sesicthub-product-card:hover .sesicthub-product-image-link img {
    transform: scale(1.05);
}

.sesicthub-product-info {
    padding: 16px;
}

.sesicthub-product-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
}

.sesicthub-product-title a {
    color: var(--ses-text);
    text-decoration: none;
}

.sesicthub-product-title a:hover {
    color: var(--ses-accent);
}

.sesicthub-product-specs {
    font-size: 12px;
    color: var(--ses-text-light);
    margin: 0 0 12px;
    line-height: 1.4;
}

.sesicthub-product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--ses-success);
    margin: 0 0 12px;
}

.sesicthub-product-price del {
    color: var(--ses-text-light);
    font-size: 14px;
    font-weight: 400;
    margin-right: 6px;
}

.sesicthub-product-buttons {
    display: flex;
    gap: 8px;
}

.sesicthub-product-button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: var(--ses-radius);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: all var(--ses-transition);
}

.sesicthub-product-button-cart {
    background: var(--ses-accent);
    color: #fff;
}

.sesicthub-product-button-cart:hover {
    background: #005a87;
    color: #fff;
}

.sesicthub-product-button-whatsapp {
    background: var(--ses-primary);
    color: #fff;
}

.sesicthub-product-button-whatsapp:hover {
    background: var(--ses-primary-dark);
    color: #fff;
}

/* Why Buy Section */
.sesicthub-landing-why-buy {
    padding: 60px 0;
    background: var(--ses-bg-light);
}

.sesicthub-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media screen and (min-width: 768px) {
    .sesicthub-features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

.sesicthub-feature-card {
    background: var(--ses-bg);
    padding: 24px;
    border-radius: var(--ses-radius-lg);
    text-align: center;
    box-shadow: var(--ses-shadow);
}

.sesicthub-feature-icon {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: var(--ses-accent);
    border-radius: 50%;
    position: relative;
}

.sesicthub-feature-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
}

.sesicthub-feature-icon-check::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
}

.sesicthub-feature-icon-shield::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z'/%3E%3C/svg%3E");
}

.sesicthub-feature-icon-truck::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4z'/%3E%3C/svg%3E");
}

.sesicthub-feature-icon-store::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z'/%3E%3C/svg%3E");
}

.sesicthub-feature-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: var(--ses-text);
}

/* Visit Shop Section */
.sesicthub-landing-visit-shop {
    padding: 60px 0;
    background: var(--ses-bg);
}

.sesicthub-visit-shop-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
}

@media screen and (min-width: 768px) {
    .sesicthub-visit-shop-content {
        grid-template-columns: 1fr 1fr;
    }
}

.sesicthub-visit-shop-image img {
    width: 100%;
    height: auto;
    border-radius: var(--ses-radius-lg);
    box-shadow: var(--ses-shadow);
}

.sesicthub-visit-shop-info {
    padding: 20px;
}

.sesicthub-visit-shop-address {
    font-size: 16px;
    line-height: 1.6;
    color: var(--ses-text);
    margin: 0 0 16px;
}

.sesicthub-visit-shop-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: var(--ses-accent);
    color: #fff;
    text-decoration: none;
    border-radius: var(--ses-radius);
    font-weight: 500;
    transition: background var(--ses-transition);
}

.sesicthub-visit-shop-link:hover {
    background: #005a87;
    color: #fff;
}

/* Testimonials Section */
.sesicthub-landing-testimonials {
    padding: 60px 0;
    background: var(--ses-bg-light);
}

.sesicthub-testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media screen and (min-width: 768px) {
    .sesicthub-testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.sesicthub-testimonial-card {
    background: var(--ses-bg);
    padding: 24px;
    border-radius: var(--ses-radius-lg);
    margin: 0;
    box-shadow: var(--ses-shadow);
}

.sesicthub-testimonial-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ses-text);
    margin: 0 0 16px;
    font-style: italic;
}

.sesicthub-testimonial-author {
    font-size: 13px;
    color: var(--ses-text-light);
    font-weight: 500;
}

/* Footer CTA */
.sesicthub-landing-footer-cta {
    padding: 60px 20px;
    background: var(--ses-text);
    text-align: center;
}

.sesicthub-footer-cta-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
}

.sesicthub-footer-cta-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 24px;
}

.sesicthub-footer-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--ses-primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--ses-radius);
    font-size: 16px;
    font-weight: 600;
    transition: all var(--ses-transition);
}

.sesicthub-footer-cta-button:hover {
    background: var(--ses-primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* ============================================
   Utility Classes
   ============================================ */
.sesicthub-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .sesicthub-announcement-strip,
    .sesicthub-whatsapp-float,
    .sesicthub-sticky-cta {
        display: none !important;
    }
}
