/**
 * IntelliShop Main Stylesheet
 * Shared styles for all pages except the homepage (see home.css).
 *
 * @package IntelliShop
 * @version 2.0
 */

/* ============================================================
   CSS CUSTOM PROPERTIES
============================================================ */
:root {
    --primary-gradient-start: #667eea;
    --primary-gradient-end:   #764ba2;
    --transition-speed: 0.3s;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   RESET & BASE
============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* ============================================================
   UTILITY CLASSES  (used by about.php, contact.php, etc.)
============================================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-gradient {
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all var(--transition-speed) ease;
}
.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.shadow-custom { box-shadow: var(--shadow-md); }

/* ============================================================
   PAGE CONTENT  (about, contact, login, register, blog)
   Single shared wrapper — consistent 3 rem gap before footer.
============================================================ */
.page-content {
    padding: 3rem 0;
    background: #f8f9fa;
}

/* Neutralise Bootstrap mb-* on the last row so padding alone controls the gap */
.page-content > .container > *:last-child,
.page-content > .container > .row:last-child > [class*="col-"]:last-child {
    margin-bottom: 0 !important;
}

/* Products section — same bottom, slightly less top (follows rec strip) */
.products-section {
    padding: 1.5rem 0 3rem;
    background: #f8f9fa;
}
.products-section > .container > *:last-child {
    margin-bottom: 0 !important;
}

/* ============================================================
   SHARED PAGE HERO
   Used by: about, contact, products, blog, blog-list, page.php
============================================================ */

/* Navbar spacer colour — matches hero background */
body:has(.page-hero)      .navbar-spacer { background: #1e1b4b; }
body:has(.about-hero)     .navbar-spacer { background: #1e1b4b; }
body:has(.contact-hero)   .navbar-spacer { background: #1e1b4b; }
body:has(.products-hero)  .navbar-spacer { background: #1e1b4b; }

/* Animated accent keyframe (shared by hero and home.css) */
@keyframes ph-accent {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* Base hero block */
.page-hero,
.about-hero,
.contact-hero,
.products-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #3730a3 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 52px 0 36px;
    margin: 0 !important;
    position: relative;
    overflow: hidden;
}

/* Layered radial glows */
.page-hero::before,
.about-hero::before,
.contact-hero::before,
.products-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 60%, rgba(129, 140, 248, 0.20) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 30%, rgba(167, 139, 250, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(196, 181, 253, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* Animated top accent line */
.page-hero::after,
.about-hero::after,
.contact-hero::after,
.products-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #667eea);
    background-size: 200% 100%;
    animation: ph-accent 5s linear infinite;
}

/* Inner wrappers */
.page-hero-inner,
.about-hero-inner,
.contact-hero-inner,
.products-hero-inner {
    max-width: 100%;
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Breadcrumbs */
.page-hero-breadcrumb,
.about-breadcrumb,
.contact-breadcrumb,
.products-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.45);
}

.page-hero-breadcrumb a,
.about-breadcrumb a,
.contact-breadcrumb a,
.products-breadcrumb a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.page-hero-breadcrumb a:hover,
.about-breadcrumb a:hover,
.contact-breadcrumb a:hover,
.products-breadcrumb a:hover { color: #ffd700; }

.page-hero-breadcrumb a i,
.about-breadcrumb a i,
.contact-breadcrumb a i,
.products-breadcrumb a i { font-size: 0.8125rem; }

.page-hero-breadcrumb .separator,
.about-breadcrumb .separator,
.contact-breadcrumb .separator,
.products-breadcrumb .separator {
    color: rgba(255, 255, 255, 0.2);
    font-weight: 300;
}

.page-hero-breadcrumb .current,
.about-breadcrumb .current,
.contact-breadcrumb .current,
.products-breadcrumb .current {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Titles */
.page-hero-title,
.about-title,
.contact-title,
.products-title {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -1.5px;
    line-height: 1.1;
    text-align: center;
}

/* Products page: title + count badge row */
.products-header-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    flex-wrap: wrap;
    width: 100%;
}

.products-item-count {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    background: rgba(102, 126, 234, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.35);
    backdrop-filter: blur(8px);
}

/* Mobile hero */
@media (max-width: 768px) {
    .page-hero,
    .about-hero,
    .contact-hero,
    .products-hero {
        padding: 40px 0 28px;
    }

    .page-hero-title,
    .about-title,
    .contact-title,
    .products-title {
        font-size: 2.25rem;
        letter-spacing: -1px;
    }
}

/* ============================================================
   FEATURE CARD  (about.php, contact.php)
============================================================ */
.feature-card {
    transition: transform var(--transition-speed) ease;
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: 12px;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* ============================================================
   SECTION TITLE  (about.php, contact.php, blog-list.php)
============================================================ */
.section-title {
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-gradient-start), var(--primary-gradient-end));
    border-radius: 2px;
}

/* ============================================================
   LOGIN & REGISTER PAGES
============================================================ */
.register-page-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Auth pages: body gradient shows through the content section */
.register-page-body .page-content {
    background: transparent;
    padding: 3rem 0;
}

.register-card {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.login-card {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.login-container {
    /* min-height removed — page-content padding handles spacing */
}

.btn-custom {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   PROFILE PAGE
============================================================ */
.profile-avatar-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   PRODUCT DETAIL PAGE
============================================================ */
.product-img-fixed {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-placeholder-box {
    height: 200px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-radius: 8px;
}

.product-detail-section {
    padding: 2rem 0 4rem;
    background: #f9fafb;
}

.product-breadcrumb {
    margin-bottom: 2rem;
}
.product-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}
.product-breadcrumb .breadcrumb-item a {
    color: #667eea;
    text-decoration: none;
}
.product-breadcrumb .breadcrumb-item a:hover { text-decoration: underline; }
.product-breadcrumb .breadcrumb-item.active { color: #6b7280; }

.product-detail-image {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 2rem;
}
.product-main-img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    max-height: 500px;
}
.product-detail-placeholder {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border-radius: 8px;
}
.product-detail-placeholder i { font-size: 5rem; color: #9ca3af; }

.product-detail-info {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
