/**
 * BuildMart Custom Styles
 * Additional styles and overrides
 *
 * @package BuildMart
 */

/* ===== Header Scroll Effect ===== */
.site-header {
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* ===== Mobile Navigation Close Button ===== */
/* Moved to style.css responsive section */

/* ===== Hero Video Overlay (optional) ===== */
.hero-section {
    position: relative;
}

/* ===== Product Card Badge Variants ===== */
.product-card-badge.hot {
    background: #dc2626;
}

.product-card-badge.new {
    background: var(--color-success);
}

/* ===== Star Rating Styles ===== */
.star-rating {
    display: inline-flex;
    gap: 1px;
}

.star-rating .star {
    color: var(--color-star);
    font-size: 14px;
    line-height: 1;
}

.star-rating .star.empty {
    color: #d1d5db;
}

/* ===== FAQ Animation ===== */
.faq-item {
    transition: box-shadow 0.2s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-sm);
}

.faq-answer {
    transition: max-height 0.3s ease;
}

/* ===== Form Styles ===== */
.form-control::placeholder {
    color: #9ca3af;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

/* ===== Loading State ===== */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Print Styles ===== */
@media print {
    .site-header,
    .site-footer,
    .float-inquiry,
    .product-actions,
    .breadcrumb,
    .hero-section {
        display: none !important;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    body {
        font-size: 12pt;
        color: #000;
    }
}

/* ===== Accessibility ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: #fff;
    padding: 8px 16px;
    z-index: 100000;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ===== WordPress Block Editor Alignment ===== */
.alignwide {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* ===== Gallery Lightbox Placeholder ===== */
.product-gallery-main img {
    cursor: zoom-in;
}

/* ===== Smooth Section Transitions ===== */
.section {
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* ===== Category Page Description ===== */
.taxonomy-description {
    max-width: 800px;
    margin: 0 auto 32px;
    text-align: center;
    color: var(--color-neutral);
    line-height: 1.7;
}

/* ===== Breadcrumb Responsive ===== */
@media (max-width: 768px) {
    .breadcrumb {
        font-size: 12px;
        padding: 12px 0;
    }

    .breadcrumb .separator {
        margin: 0 4px;
    }
}

/* ===== News Category Tags ===== */
.news-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--color-neutral-light);
    border-radius: 12px;
    font-size: 12px;
    color: var(--color-neutral);
    margin-right: 4px;
}

/* ===== Product Compare Table ===== */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.compare-table th,
.compare-table td {
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    text-align: left;
}

.compare-table th {
    background: var(--color-neutral-light);
    font-weight: 600;
}

/* ===== Cookie Consent Placeholder ===== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-neutral-dark);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 9999;
    font-size: 14px;
}

.cookie-consent .btn {
    flex-shrink: 0;
    margin-left: 16px;
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 899;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* ===== Product Number / SKU Display ===== */
.product-card-sku {
    font-size: 12px;
    color: var(--color-neutral);
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
    font-family: 'Inter', monospace;
}

.product-number-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--color-neutral-light);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 12px;
}

.product-number-display strong {
    color: var(--color-neutral);
    font-weight: 500;
}

.product-number-display span {
    color: var(--color-primary);
    font-weight: 700;
    font-family: 'Inter', monospace;
    letter-spacing: 0.03em;
}

/* ===== Hero Slider Admin ===== */
.buildmart-hero-slider-admin .hero-slide-row {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #fff;
    overflow: hidden;
}

.buildmart-hero-slider-admin .hero-slide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f0f0f1;
    border-bottom: 1px solid #ddd;
}

.buildmart-hero-slider-admin .hero-slide-header h3 {
    margin: 0;
    font-size: 14px;
}

.buildmart-hero-slider-admin .hero-slide-body {
    display: flex;
    gap: 20px;
    padding: 16px;
}

.buildmart-hero-slider-admin .hero-slide-image-col {
    flex: 0 0 240px;
}

.buildmart-hero-slider-admin .hero-slide-image-col label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.buildmart-hero-slider-admin .hero-slide-image-preview {
    width: 240px;
    height: 120px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
    background: #f9f9f9;
}

.buildmart-hero-slider-admin .hero-slide-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.buildmart-hero-slider-admin .hero-slide-text-col {
    flex: 1;
}

.buildmart-hero-slider-admin .hero-slide-field {
    margin-bottom: 12px;
}

.buildmart-hero-slider-admin .hero-slide-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 13px;
}

.buildmart-hero-slider-admin .hero-slide-field input,
.buildmart-hero-slider-admin .hero-slide-field textarea {
    width: 100%;
}

@media (max-width: 782px) {
    .buildmart-hero-slider-admin .hero-slide-body {
        flex-direction: column;
    }

    .buildmart-hero-slider-admin .hero-slide-image-col {
        flex: none;
    }
}

/* ============================================
   Why Choose Us Cards
   ============================================ */
.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.why-choose-card {
    text-align: center;
    padding: 40px 32px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.why-choose-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.why-choose-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.why-choose-card h3 {
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
}

.why-choose-card p {
    color: var(--color-neutral);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 1024px) {
    .why-choose-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .why-choose-card {
        padding: 32px 24px;
    }
}

@media (max-width: 768px) {
    .why-choose-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .why-choose-card {
        padding: 28px 24px;
    }
}

/* ============================================
   Services Cards (About Page)
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.services-card {
    padding: 32px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    text-align: center;
    transition: all var(--transition);
}

.services-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary);
}

.services-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--color-neutral-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.services-card-title {
    margin-bottom: 12px;
    font-size: 18px;
}

.services-card-desc {
    color: var(--color-neutral);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Tablet */
@media (max-width: 1024px) {
    .services-grid {
        gap: 24px;
    }

    .services-card {
        padding: 24px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .services-card {
        padding: 28px 24px;
    }
}

/* ============================================
   Phone Input Group (Country Code + Number)
   ============================================ */
.phone-input-group {
    display: flex;
    gap: 8px;
}

.phone-code-select {
    width: 130px;
    flex-shrink: 0;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background: #fff;
    font-size: 14px;
    color: var(--color-text);
    cursor: pointer;
    appearance: auto;
}

.phone-code-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.phone-number-input {
    flex: 1;
    min-width: 0;
}

/* Mobile */
@media (max-width: 768px) {
    .phone-input-group {
        flex-direction: column;
        gap: 8px;
    }

    .phone-code-select {
        width: 100%;
    }
}
