/*! DTI Product Browse Page Styles */
/* Extracted from public_product_browse.php for proper separation of concerns */

:root {
    --primary-blue: #1e3c72;
    --secondary-blue: #2a5298;
    --light-blue: #dbeafe;
    --accent-blue: #3b82f6;
    --text-dark: #1a1a1a;
    --text-light: #6b7280;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --border-light: #e1e5e9;
    --success-green: #10b981;
    --warning-red: #dc3545;
    --freeze-orange: #f59e0b;
    --neutral-gray: #f5f5f5;
    --dark-gray: #333333;
    --gradient-primary: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--gradient-secondary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

/* Main Content Wrapper */
.main-content-wrapper {
    min-height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Main Layout */
.main-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 0;
    background: var(--bg-white);
    border-radius: 0;
    box-shadow: none;
    flex: 1;
}

/* Sidebar */
.sidebar {
    background: var(--gradient-primary);
    padding: 1rem;
    border-radius: 0;
    color: var(--bg-white);
    height: 100vh;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 1rem;
}

.sidebar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bg-white);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    margin-bottom: 0.5rem;
}

.sidebar-list a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.sidebar-list a:hover,
.sidebar-list a.active {
    color: var(--bg-white);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
}

.sidebar-list a.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--bg-white);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

/* Main Content */
.main-content {
    padding: 1rem;
    height: 100vh;
    overflow-y: auto;
}

/* Sidebar form inputs */
.sidebar input[type="text"],
.sidebar input[type="number"],
.sidebar button {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    transition: all 0.3s ease;
    outline: none;
}

.sidebar input[type="text"]:focus,
.sidebar input[type="number"]:focus {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.sidebar button {
    background: var(--bg-white);
    color: var(--primary-blue);
    border: 2px solid var(--bg-white);
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
}

.sidebar button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.content-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

.content-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sort-select {
    border: 1px solid var(--border-light);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 0.9rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: var(--dark-gray);
    color: var(--bg-white);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Clickable card styles */
.clickable-card {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.clickable-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(30, 60, 114, 0.2);
    border-color: var(--primary-blue);
}

.clickable-card:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.clickable-card .click-hint {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.clickable-card:hover .click-hint {
    opacity: 1;
}

.product-card.price-frozen {
    border: 4px solid #87ceeb;
    background: 
        linear-gradient(135deg, #e6f3ff 0%, #d1ecf1 25%, #b8e6f0 50%, #a8d8ea 75%, #e6f3ff 100%),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(135, 206, 235, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.4) 0%, transparent 30%);
    position: relative;
    overflow: hidden;
    filter: brightness(1.2) contrast(0.9);
}

.product-card.price-frozen::before {
    content: "❄️ FROZEN ❄️";
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.9) 0%, rgba(70, 130, 180, 0.9) 50%, rgba(95, 158, 160, 0.9) 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.5);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    animation: iceShimmer 3s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.product-card.price-frozen::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        /* Large snowflakes - reduced opacity to preserve product visibility */
        radial-gradient(circle at 15% 25%, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.15) 15%, transparent 25%),
        radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 12%, transparent 20%),
        radial-gradient(circle at 60% 15%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 10%, transparent 18%),
        /* Medium ice crystals - lighter */
        radial-gradient(ellipse at 30% 70%, rgba(135, 206, 235, 0.15) 0%, transparent 30%),
        radial-gradient(ellipse at 70% 30%, rgba(135, 206, 235, 0.12) 0%, transparent 25%),
        /* Small frost patterns - subtle */
        radial-gradient(circle at 45% 45%, rgba(255, 255, 255, 0.1) 0%, transparent 8%),
        radial-gradient(circle at 75% 55%, rgba(255, 255, 255, 0.08) 0%, transparent 6%),
        radial-gradient(circle at 25% 85%, rgba(255, 255, 255, 0.09) 0%, transparent 7%);
    z-index: 5;
    pointer-events: none;
    animation: frostSpread 6s ease-in-out infinite;
}

.product-card.price-frozen .product-image {
    filter: brightness(1.1) contrast(1.0) saturate(1.0);
    position: relative;
}

.product-card.price-frozen .product-image::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        /* Ice crystal formations - reduced opacity to preserve product colors */
        linear-gradient(45deg, transparent 20%, rgba(255, 255, 255, 0.15) 30%, rgba(135, 206, 235, 0.08) 40%, transparent 50%),
        linear-gradient(-45deg, transparent 20%, rgba(255, 255, 255, 0.12) 35%, rgba(70, 130, 180, 0.06) 45%, transparent 55%),
        linear-gradient(90deg, transparent 10%, rgba(255, 255, 255, 0.1) 20%, transparent 30%),
        linear-gradient(0deg, transparent 15%, rgba(135, 206, 235, 0.08) 25%, transparent 35%),
        /* Additional frost patterns - lighter */
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 15%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.15) 0%, transparent 12%);
    animation: iceCrystals 8s linear infinite;
}

/* Additional ice pattern overlay */
.product-card.price-frozen .product-info::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: 
        /* Intricate snowflake patterns - reduced opacity */
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 8%),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.09) 0%, transparent 7%),
        radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.08) 0%, transparent 6%),
        radial-gradient(circle at 30% 90%, rgba(255, 255, 255, 0.06) 0%, transparent 5%),
        /* Frost lines - subtle */
        linear-gradient(30deg, transparent 40%, rgba(135, 206, 235, 0.05) 50%, transparent 60%),
        linear-gradient(-30deg, transparent 35%, rgba(255, 255, 255, 0.04) 45%, transparent 55%);
    z-index: 1;
    pointer-events: none;
    animation: frostPattern 10s ease-in-out infinite;
}

@keyframes iceShimmer {
    0%, 100% {
        box-shadow: 0 2px 10px rgba(135, 206, 235, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(135, 206, 235, 0.7);
        transform: scale(1.02);
    }
}

@keyframes frostSpread {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

@keyframes iceCrystals {
    0% {
        transform: translateX(-100%) rotate(0deg);
    }
    100% {
        transform: translateX(100%) rotate(360deg);
    }
}

@keyframes frostPattern {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1) rotate(0deg);
    }
    25% {
        opacity: 0.5;
        transform: scale(1.02) rotate(1deg);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.05) rotate(0deg);
    }
    75% {
        opacity: 0.6;
        transform: scale(1.02) rotate(-1deg);
    }
}

.product-card.price-frozen:hover {
    border-color: #4682b4;
    box-shadow: 0 15px 35px rgba(135, 206, 235, 0.3);
    transform: translateY(-8px) scale(1.02);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--neutral-gray);
}

.product-info {
    padding: 1rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-frozen-indicator {
    background: linear-gradient(135deg, #87ceeb 0%, #4682b4 50%, #5f9ea0 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 8px;
    box-shadow: 0 3px 8px rgba(135, 206, 235, 0.4);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    animation: iceShimmer 3s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.buy-btn {
    background: var(--text-dark);
    color: var(--bg-white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    float: right;
}

.buy-btn:hover {
    background: var(--primary-blue);
}

/* Price Freeze Alert */
.freeze-alert {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 30%, #ddeeff 70%, #f0f8ff 100%);
    border: 3px solid #87ceeb;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 6px 20px rgba(135, 206, 235, 0.25);
    position: relative;
    overflow: hidden;
    filter: brightness(1.05);
}

.freeze-alert::before {
    content: "🧊";
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    opacity: 0.4;
    animation: iceShimmer 3s ease-in-out infinite;
}

.freeze-alert::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(135, 206, 235, 0.1) 0%, transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(70, 130, 180, 0.1) 0%, transparent 60%);
    animation: frostSpread 4s ease-in-out infinite;
    pointer-events: none;
}

.freeze-alert-icon {
    font-size: 2.5rem;
    color: #4682b4;
    animation: iceShimmer 3s ease-in-out infinite;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.freeze-alert-text {
    color: #4682b4;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Footer CTA */
.footer-cta {
    background: var(--neutral-gray);
    padding: 1.5rem;
    text-align: center;
    border-radius: 8px;
    margin-top: 1rem;
}

.cta-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.cta-subtitle {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.cta-btn {
    background: var(--primary-blue);
    color: var(--bg-white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    background: var(--secondary-blue);
}

/* Product Details Modal Styling */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    background: var(--gradient-primary);
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    color: var(--bg-white);
}

.modal-title {
    color: var(--bg-white);
    font-weight: 700;
    font-size: 1.25rem;
}

.product-details-info h6 {
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-details-info p {
    color: var(--text-dark);
    font-size: 1rem;
}

.modal-footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
    border-radius: 0 0 20px 20px;
    padding: 1.5rem;
}

.modal-footer .btn {
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-footer .btn-secondary {
    background: var(--border-light);
    color: var(--text-dark);
    border: 2px solid var(--border-light);
}

.modal-footer .btn-secondary:hover {
    background: var(--text-light);
    border-color: var(--text-light);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
    border: 1px solid #87ceeb;
    color: #4682b4;
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        margin: 0;
        border-radius: 0;
    }
    
    .sidebar {
        order: 2;
        border-radius: 0;
        padding: 1rem;
        height: auto;
    }
    
    .main-content {
        order: 1;
        height: auto;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.5rem;
    }
    
    .content-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

/* Footer Styling for Public Browse */
.landing-footer {
    margin-top: auto;
    background: var(--gradient-primary) !important;
    color: white;
    position: relative;
    z-index: 10;
}

.landing-footer-container {
    max-width: 100%;
    margin: 0;
    padding: 0 1rem;
}

.landing-footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 2rem 0 1rem;
}

.landing-footer-section {
    display: flex;
    flex-direction: column;
}

.landing-footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.landing-footer-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.9rem;
}

.landing-social-links {
    display: flex;
    gap: 0.75rem;
}

.landing-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.landing-social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.landing-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.landing-footer-links li {
    margin-bottom: 0.4rem;
}

.landing-footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.landing-footer-links a:hover {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
}

.landing-contact-info p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.landing-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
}

.landing-footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.landing-copyright {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.85rem;
}

.landing-footer-bottom-links {
    display: flex;
    gap: 1rem;
}

.landing-footer-bottom-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.landing-footer-bottom-links a:hover {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .landing-footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem 0 1rem;
    }
    
    .landing-footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .landing-footer-bottom-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .landing-footer-container {
        padding: 0 0.5rem;
    }
}
