/* ============================================
   PRODUCT PAGE STYLES
   Brutalist industrial design
============================================ */

/* ============================================
   PRODUCT HERO SECTION
============================================ */
.product-hero {
    padding: calc(var(--header-height) + 3rem) clamp(1.5rem, 5vw, 4rem) 4rem;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* Grid pattern background */
.product-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image:
        repeating-linear-gradient(
            90deg,
            rgba(196, 92, 38, 0.03) 0px,
            rgba(196, 92, 38, 0.03) 1px,
            transparent 1px,
            transparent 60px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(196, 92, 38, 0.03) 0px,
            rgba(196, 92, 38, 0.03) 1px,
            transparent 1px,
            transparent 60px
        );
    mask-image: linear-gradient(to left, rgba(0,0,0,0.6) 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.6) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* Diagonal accent line */
.product-hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: 15%;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(196, 92, 38, 0.15) 30%,
        rgba(196, 92, 38, 0.15) 70%,
        transparent 100%
    );
    transform: skewX(-15deg);
    pointer-events: none;
    z-index: 0;
}

.product-hero__container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ============================================
   BREADCRUMB
============================================ */
.product-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.product-breadcrumb a {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.product-breadcrumb a:hover {
    color: var(--accent);
}

.product-breadcrumb svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-muted);
    opacity: 0.5;
}

.product-breadcrumb span:last-child {
    color: var(--text-primary);
}

/* ============================================
   PRODUCT MAIN LAYOUT
============================================ */
.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* ============================================
   PRODUCT GALLERY
============================================ */
.product-gallery {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

.product-gallery__main {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    margin-bottom: 1rem;
}

.product-gallery__main::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(196, 92, 38, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Corner accents */
.product-gallery__corner {
    position: absolute;
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 3;
}

.product-gallery__corner--tl {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
}

.product-gallery__corner--tr {
    top: -1px;
    right: -1px;
    border-top: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
}

.product-gallery__corner--bl {
    bottom: -1px;
    left: -1px;
    border-bottom: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
}

.product-gallery__corner--br {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
}

/* Index number decoration */
.product-gallery__index {
    position: absolute;
    top: -2rem;
    left: 0;
    font-family: var(--font-display);
    font-size: 6rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(196, 92, 38, 0.1);
    text-stroke: 1px rgba(196, 92, 38, 0.1);
    line-height: 1;
    pointer-events: none;
    z-index: 0;
}

.product-gallery__main img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.5s var(--ease-out-expo);
}

.product-gallery__main:hover img {
    transform: scale(1.05);
}

.product-gallery__badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    padding: 0.5rem 1rem;
    background: var(--accent);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    z-index: 2;
}

.product-gallery__zoom {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.product-gallery__zoom:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.product-gallery__zoom svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
}

.product-gallery__thumbs {
    display: flex;
    gap: 0.75rem;
}

.product-gallery__thumb {
    flex: 1;
    aspect-ratio: 1;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-gallery__thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.product-gallery__thumb:hover img {
    opacity: 1;
}

.product-gallery__thumb.active {
    border-color: var(--accent);
}

.product-gallery__thumb.active img {
    opacity: 1;
}

/* ============================================
   PRODUCT INFO
============================================ */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.product-info__header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-info__category {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
}

.product-info__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.product-info__subtitle {
    font-family: var(--font-body);
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* ============================================
   PRODUCT FEATURES
============================================ */
.product-info__features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.product-feature {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 1rem 0.9rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    min-width: 0;
}

.product-feature:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.product-feature__icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(196, 92, 38, 0.1);
    flex-shrink: 0;
}

.product-feature__icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent);
}

.product-feature__text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    width: 100%;
}

.product-feature__label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-feature__value {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
}

/* ============================================
   PRODUCT DESCRIPTION
============================================ */
.product-info__description {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.product-info__description p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* ============================================
   PRODUCT ACTIONS
============================================ */
.product-info__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 1.25rem 2rem;
    font-size: 1rem;
}

/* ============================================
   PRODUCT SPECIFICATIONS
============================================ */
.product-specs {
    padding: 5rem clamp(1.5rem, 5vw, 4rem);
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

/* Decorative grid pattern */
.product-specs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background-image:
        linear-gradient(rgba(196, 92, 38, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(196, 92, 38, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to right, rgba(0,0,0,0.5) 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0.5) 0%, transparent 100%);
    pointer-events: none;
}

.product-specs__container {
    max-width: 1400px;
    margin: 0 auto;
}

.product-specs__header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.product-specs__label {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(196, 92, 38, 0.1);
    padding: 0.5rem 1rem;
}

.product-specs__title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
}

.product-specs__grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* Specs Table */
.specs-table {
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.specs-table__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

.specs-table__row:last-child {
    border-bottom: none;
}

.specs-table__row:hover {
    background: rgba(196, 92, 38, 0.03);
}

.specs-table__key {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-muted);
}

.specs-table__value {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Specs Card */
.specs-card {
    padding: 2rem;
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.specs-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
}

.specs-card__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(196, 92, 38, 0.1);
    margin-bottom: 1.5rem;
}

.specs-card__icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--accent);
}

.specs-card__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.specs-card__text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.specs-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    transition: all 0.3s ease;
}

.specs-card__link:hover {
    gap: 0.75rem;
}

.specs-card__link svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   PRODUCT APPLICATIONS
============================================ */
.product-applications {
    padding: 5rem clamp(1.5rem, 5vw, 4rem);
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* Diagonal accent line */
.product-applications::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(196, 92, 38, 0.1) 20%,
        rgba(196, 92, 38, 0.1) 80%,
        transparent 100%
    );
    transform: skewX(-15deg);
    pointer-events: none;
}

/* Corner bracket decoration */
.product-applications::after {
    content: '';
    position: absolute;
    bottom: 3rem;
    right: 5%;
    width: 60px;
    height: 60px;
    border-right: 2px solid rgba(196, 92, 38, 0.15);
    border-bottom: 2px solid rgba(196, 92, 38, 0.15);
    pointer-events: none;
}

.product-applications__container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.product-applications__header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.product-applications__label {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(196, 92, 38, 0.1);
    padding: 0.5rem 1rem;
}

.product-applications__title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.application-card {
    position: relative;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s var(--ease-out-expo);
}

.application-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.application-card__number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.5;
}

.application-card__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(196, 92, 38, 0.1);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.application-card:hover .application-card__icon {
    background: var(--accent);
}

.application-card__icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--accent);
    transition: stroke 0.3s ease;
}

.application-card:hover .application-card__icon svg {
    stroke: #fff;
}

.application-card__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.application-card__text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ============================================
   RELATED PRODUCTS
============================================ */
.related-products {
    padding: 5rem clamp(1.5rem, 5vw, 4rem);
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

/* Subtle dot pattern */
.related-products::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background-image: radial-gradient(rgba(196, 92, 38, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    mask-image: linear-gradient(to left, rgba(0,0,0,0.4) 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.4) 0%, transparent 100%);
    pointer-events: none;
}

.related-products__container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.related-products__header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.related-products__label {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(196, 92, 38, 0.1);
    padding: 0.5rem 1rem;
}

.related-products__title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
}

.related-products__link {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    transition: all 0.3s ease;
}

.related-products__link:hover {
    gap: 0.75rem;
}

.related-products__link svg {
    width: 18px;
    height: 18px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Product Card (reuse from catalog) */
.related-grid .product-card {
    display: block;
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s var(--ease-out-expo);
}

.related-grid .product-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.related-grid .product-card__image {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.related-grid .product-card__image img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    transition: transform 0.5s var(--ease-out-expo);
}

.related-grid .product-card:hover .product-card__image img {
    transform: scale(1.08);
}

.related-grid .product-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-grid .product-card:hover .product-card__overlay {
    opacity: 1;
}

.related-grid .product-card__overlay span {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
}

.related-grid .product-card__overlay svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent);
}

.related-grid .product-card__info {
    padding: 1.5rem;
}

.related-grid .product-card__name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.related-grid .product-card__desc {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================
   LIGHT THEME OVERRIDES
============================================ */
.light-theme .product-hero {
    background: var(--bg-primary);
}

.light-theme .product-hero::before {
    background-image:
        repeating-linear-gradient(
            90deg,
            rgba(196, 92, 38, 0.05) 0px,
            rgba(196, 92, 38, 0.05) 1px,
            transparent 1px,
            transparent 60px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(196, 92, 38, 0.05) 0px,
            rgba(196, 92, 38, 0.05) 1px,
            transparent 1px,
            transparent 60px
        );
}

.light-theme .product-gallery__main {
    background: #f8f8f8;
    border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .product-gallery__thumb {
    background: #f8f8f8;
}

.light-theme .product-feature {
    background: #f8f8f8;
    border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .product-specs {
    background: #f5f5f5;
}

.light-theme .specs-table {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .specs-table__row {
    border-color: rgba(0, 0, 0, 0.05);
}

.light-theme .specs-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .application-card {
    background: #f8f8f8;
    border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .related-products {
    background: #f5f5f5;
}

.light-theme .related-grid .product-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .related-grid .product-card__image {
    background: linear-gradient(135deg, #f8f8f8 0%, #fff 100%);
}

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-main {
    animation: fadeInUp 0.8s var(--ease-out-expo);
}

.product-specs,
.product-applications,
.related-products {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
}

.product-specs {
    animation-delay: 0.1s;
}

.product-applications {
    animation-delay: 0.2s;
}

.related-products {
    animation-delay: 0.3s;
}
