/*
 * Global Stylesheet for Sarash Apparel Ltd website
 *
 * This file defines the design language for the site: colours, fonts,
 * layout utilities and responsive behaviour. Colours are inspired by
 * the company logo—teal, gold and maroon—combined with neutral tones
 * for a clean, modern aesthetic.
 */

/* Colour palette variables */
:root {
    --color-primary: #004F4A;      /* deep teal */
    --color-secondary: #D4A036;    /* warm gold */
    --color-accent: #642B46;       /* maroon/purple */
    --color-dark: #1D1D1D;         /* near‑black for text */
    /* Use a warm beige for page backgrounds instead of stark white.  */
    --color-light: #F5F0E6;        /* beige base background */
    --color-muted: #EFE8DE;        /* slightly darker beige for subtle section backgrounds */
    --font-family-base: 'Montserrat', sans-serif;
}

/* Reset and base typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-base);
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-light);
}

img {
    max-width: 100%;
    display: block;
}

/* Navigation bar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Increase vertical padding to accommodate a taller logo */
    padding: 1rem 1rem;
    /* Semi‑transparent beige overlay instead of white */
    background-color: #f5f0e6cc;
    backdrop-filter: blur(5px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    /* Increase min-height to accommodate oversized logo */
    min-height: 160px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-image {
    /* Make the logo significantly larger (approximately three times
       bigger than the initial size) */
    height: 150px;
    width: auto;
}

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

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

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

/* Theme selector styling */
.theme-selector {
    margin-left: 1rem;
}

.theme-selector select {
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--color-muted);
    background-color: var(--color-light);
    color: var(--color-dark);
    font-family: var(--font-family-base);
    font-size: 0.9rem;
}

/* Visually hidden utility class for accessible labels */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--color-dark);
    border-radius: 2px;
}

/* Hero slider */
.hero {
    margin-top: 170px; /* offset for fixed nav now that logo and navbar are larger */
}

.slider {
    position: relative;
    height: 75vh;
    overflow: hidden;
}

.slider .slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider .slide.active {
    opacity: 1;
}

.slider-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.slider-overlay h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

/* Tagline styling under hero heading */
.slider-overlay .tagline {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.slider-overlay p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 3px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--color-accent);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: var(--color-accent);
}

/* Section styles */
.section {
    padding: 4rem 1rem;
    /* offset anchor scroll so content isn't hidden behind the now larger fixed nav */
    scroll-margin-top: 170px;
}

.section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.2rem;
    color: var(--color-primary);
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* About section */
.about p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.7;
    /* Use theme variable for text colour so it adjusts in dark and abstract modes */
    color: var(--color-dark);
}

/* Products section */
.products .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.product-category {
    background-color: var(--color-muted);
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.product-category h3 {
    margin-bottom: 0.8rem;
    color: var(--color-accent);
    font-size: 1.4rem;
}

.product-category ul {
    list-style: none;
    line-height: 1.5;
}

.product-category ul li {
    margin-bottom: 0.4rem;
    padding-left: 1rem;
    position: relative;
    color: var(--color-dark);
    font-size: 1rem;
}

.product-category ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

/* Portfolio section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    align-items: center;
}

.portfolio-item {
    background-color: #ffffff;
    border-radius: 4px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.portfolio-item img {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}

/* Contact section */
.contact-info p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-info a {
    color: var(--color-primary);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Inquiry form */
.inquiry .form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.inquiry label {
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--color-dark);
}

.inquiry .required {
    color: var(--color-accent);
}

.inquiry input,
.inquiry textarea {
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 1rem;
    font-family: var(--font-family-base);
    resize: vertical;
}

.inquiry textarea {
    min-height: 120px;
}

.form-response {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--color-accent);
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem 0;
    background-color: var(--color-dark);
    color: #ffffff;
    font-size: 0.9rem;
}

/* Company video section */
.company-video h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
    font-size: 2rem;
}

.company-video video {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    outline: none;
}

/* Gallery section */
.gallery h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.gallery-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Gallery slider styles */
.gallery-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.gallery-slides {
    position: relative;
    width: 100%;
    height: 100%;
}
/* Each gallery slide fills the slider but preserves aspect ratio. */
.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background-color: var(--color-light);
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.gallery-slide.active {
    opacity: 1;
}

/* Portfolio slider styles */
.portfolio-slider {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    margin-top: 1.5rem;
}
.portfolio-slides {
    position: relative;
    width: 100%;
    height: 100%;
}
.portfolio-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}
.portfolio-slide.active {
    opacity: 1;
}

/* Slider navigation buttons (prev/next) */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s ease;
}
.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.6);
}
.gallery-prev, .portfolio-prev {
    left: 10px;
}
.gallery-next, .portfolio-next {
    right: 10px;
}

/* Responsive styling */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 72px;
        right: -100%;
        width: 60%;
        height: calc(100% - 72px);
        background-color: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1rem;
        gap: 1rem;
        transition: right 0.3s ease;
    }

    .nav-links.open {
        right: 0;
    }

    .menu-toggle {
        display: flex;
    }
}

/*
 * Theme definitions
 * Each theme overrides the CSS custom properties defined on :root to
 * achieve different colour schemes. The body element is assigned
 * a class of the form `<theme>-mode` via JavaScript when the user
 * chooses a theme from the dropdown. Default theme is light-mode.
 */
body.beige-mode {
    /* Beige theme: warm light neutrals reflecting natural fibres */
    --color-primary: #004F4A;
    --color-secondary: #D4A036;
    --color-accent: #642B46;
    --color-dark: #1D1D1D;
    --color-light: #F5F0E6;
    --color-muted: #EFE8DE;
}

body.sage-mode {
    /* Sage green theme: soft greens with earthy accents */
    --color-primary: #556B2F;
    --color-secondary: #8AA85E;
    --color-accent: #3B5323;
    --color-dark: #203A1E;
    --color-light: #F1F4EE;
    --color-muted: #E5ECE1;
}

body.dark-mode {
    /* Dark grey theme: muted greys with light text */
    --color-primary: #CCCCCC;
    --color-secondary: #888888;
    --color-accent: #555555;
    --color-dark: #F5F5F5;
    --color-light: #2B2B2B;
    --color-muted: #444444;
}

body.abstract-mode {
    /* Abstract theme: uses original abstract image as page background */
    --color-primary: #004F4A;
    --color-secondary: #D4A036;
    --color-accent: #642B46;
    --color-dark: #F5F5F5;
    --color-light: rgba(0, 0, 0, 0.6);
    --color-muted: rgba(0, 0, 0, 0.4);
    /* Set a dynamic background image for the entire page */
    background-image: url('assets/images/slide1.png');
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Animation for hero heading sliding from left to centre */
.slide-in {
    opacity: 0;
    transform: translateX(-100%);
    animation: slideIn 1.5s ease-out forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Final explicit theme overrides to ensure background + text update properly */
body.beige-mode {
  background-color: #F5F0E6 !important;
  color: #1D1D1D !important;
}

body.sage-mode {
  background-color: #F1F4EE !important;
  color: #203A1E !important;
}

body.dark-mode {
  background-color: #2B2B2B !important;
  color: #F5F5F5 !important;
}

body.abstract-mode {
  background: url('assets/images/slide1.png') no-repeat center center fixed !important;
  background-size: cover !important;
  color: #F5F5F5 !important;
}