/* Stock Page Styles */

.stock-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stock-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(172, 0, 19, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.stock-hero .container {
  position: relative;
  z-index: 1;
}

.stock-hero h1 {
  font-size: 42px;
  color: var(--white);
  margin-bottom: 15px;
  font-weight: 700;
}

.stock-hero p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 700px;
  margin: 0 auto;
}

/* Stock Section */
.stock-section {
  padding: 60px 0;
  background-color: var(--lt-grey);
}

.stock-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

/* Filter Sidebar */
.filter-sidebar {
  background: var(--white);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--lt-grey);
}

.filter-header h2 {
  font-size: 20px;
  color: var(--black);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-header h2 i {
  color: var(--red);
}

.clear-filters {
  background: none;
  border: none;
  color: var(--red);
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.clear-filters:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.filter-group {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--lt-grey);
  padding-bottom: 15px;
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.filter-title {
  font-size: 16px;
  color: var(--black);
  font-weight: 600;
  margin-bottom: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  transition: color 0.3s ease;
}

.filter-title:hover {
  color: var(--red);
}

.filter-title i:first-child {
  margin-right: 8px;
  color: var(--red);
}

.toggle-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.filter-title.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  transition: max-height 0.3s ease;
}

.filter-options.collapsed {
  max-height: 0;
  overflow: hidden;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.filter-option:hover {
  background-color: rgba(172, 0, 19, 0.05);
}

.filter-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--red);
}

.filter-option span:first-of-type {
  flex: 1;
  font-size: 14px;
  color: var(--black);
}

.filter-option .count {
  font-size: 12px;
  color: #666;
  font-weight: 600;
}

.filter-note {
  font-size: 13px;
  color: #666;
  font-style: italic;
  padding: 10px;
  text-align: center;
}

.mobile-filter-toggle {
  display: none;
  width: 100%;
  padding: 12px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 20px;
}

/* Stock Content */
.stock-content {
  min-height: 600px;
}

.stock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.results-info h2 {
  font-size: 24px;
  color: var(--black);
  margin-bottom: 5px;
}

.results-count {
  font-size: 14px;
  color: #666;
}

.results-count span {
  font-weight: 700;
  color: var(--red);
}

.sort-options {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-options label {
  font-size: 14px;
  color: var(--black);
  font-weight: 600;
}

.sort-options select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  background: var(--white);
  color: var(--black);
}

/* Stock Grid */
.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.stock-item {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.stock-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(172, 0, 19, 0.15);
}

.stock-item-image {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--lt-grey);
}

.stock-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.stock-item:hover .stock-item-image img {
  transform: scale(1.05);
}

.stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--red);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.stock-item-content {
  padding: 20px;
}

.stock-item-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 10px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stock-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--lt-grey);
  border-radius: 15px;
  font-size: 12px;
  color: #666;
}

.meta-tag i {
  color: var(--red);
  font-size: 11px;
}

.stock-item-description {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stock-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--lt-grey);
}

.stock-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .stock-item-price {
    font-size: 12px;
  }
}

@media (max-width: 576px) {
  .stock-item-price {
    font-size: 11px;
  }
}

.stock-item-btn {
  padding: 8px 16px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.stock-item-btn:hover {
  background: var(--dk-red);
  transform: translateX(3px);
}

/* Loading & No Results */
.loading-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.loading-message i {
  font-size: 48px;
  color: var(--red);
  margin-bottom: 20px;
}

.loading-message p {
  font-size: 18px;
}

.no-results {
  text-align: center;
  padding: 80px 20px;
  background: var(--white);
  border-radius: 12px;
}

.no-results i {
  font-size: 64px;
  color: #ddd;
  margin-bottom: 20px;
}

.no-results h3 {
  font-size: 24px;
  color: var(--black);
  margin-bottom: 10px;
}

.no-results p {
  font-size: 16px;
  color: #666;
}

.btn-link {
  background: none;
  border: none;
  color: var(--red);
  text-decoration: underline;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
}

.page-btn {
  padding: 10px 20px;
  background: var(--white);
  border: 1px solid #ddd;
  border-radius: 6px;
  color: var(--black);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 5px;
}

.page-number {
  padding: 10px 15px;
  background: var(--white);
  border: 1px solid #ddd;
  border-radius: 6px;
  color: var(--black);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-number:hover {
  background: var(--lt-grey);
}

.page-number.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

/* Stock CTA */
.stock-cta {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stock-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 80% 50%, rgba(172, 0, 19, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.stock-cta .container {
  position: relative;
  z-index: 1;
}

.stock-cta h2 {
  font-size: 32px;
  color: var(--white);
  margin-bottom: 15px;
}

.stock-cta p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 30px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .stock-layout {
    grid-template-columns: 250px 1fr;
    gap: 30px;
  }

  .stock-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .stock-hero h1 {
    font-size: 32px;
  }

  .stock-hero p {
    font-size: 16px;
  }

  .stock-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    max-height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
    border-radius: 0;
  }

  .filter-sidebar.active {
    left: 0;
  }

  .mobile-filter-toggle {
    display: block;
  }

  .stock-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .sort-options {
    width: 100%;
    justify-content: space-between;
  }

  .stock-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .stock-section {
    padding: 40px 0;
  }

  .stock-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stock-item-image {
    height: 200px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 576px) {
  .stock-hero {
    padding: 40px 0 30px;
  }

  .stock-hero h1 {
    font-size: 26px;
  }

  .stock-hero p {
    font-size: 14px;
  }

  .stock-header {
    padding: 15px;
  }

  .results-info h2 {
    font-size: 20px;
  }

  .stock-cta h2 {
    font-size: 24px;
  }

  .stock-cta p {
    font-size: 16px;
  }
}

/* Filter Sidebar Overlay (Mobile) */
.filter-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.filter-overlay.active {
  display: block;
}

@media (max-width: 992px) {
  .filter-overlay.active {
    display: block;
  }
}

/* Contact Modal */
.contact-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--white);
  border-radius: 16px;
  max-width: 550px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px;
  border-bottom: 2px solid var(--lt-grey);
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 16px 16px 0 0;
}

.modal-header h2 {
  font-size: 24px;
  color: var(--white);
  margin: 0;
  font-weight: 700;
}

.modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--red);
  transform: rotate(90deg);
}

.modal-body {
  padding: 30px;
}

.modal-item-info {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(172, 0, 19, 0.05) 0%, rgba(172, 0, 19, 0.1) 100%);
  border-radius: 12px;
  margin-bottom: 25px;
  border-left: 4px solid var(--red);
}

.modal-item-info i {
  font-size: 32px;
  color: var(--red);
}

.modal-item-info h3 {
  font-size: 18px;
  color: var(--black);
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 8px;
}

.form-group label i {
  color: var(--red);
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(172, 0, 19, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.modal-footer {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--lt-grey);
}

.modal-footer .btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.modal-footer .btn-primary {
  background: var(--red);
  color: var(--white);
}

.modal-footer .btn-primary:hover {
  background: var(--dk-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(172, 0, 19, 0.3);
}

.modal-footer .btn-secondary {
  background: var(--lt-grey);
  color: var(--black);
}

.modal-footer .btn-secondary:hover {
  background: #ddd;
}

/* Modal Responsive */
@media (max-width: 768px) {
  .contact-modal {
    padding: 10px;
  }

  .modal-content {
    max-height: 95vh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 20px;
    border-radius: 12px 12px 0 0;
  }

  .modal-header h2 {
    font-size: 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-item-info {
    padding: 15px;
  }

  .modal-item-info i {
    font-size: 24px;
  }

  .modal-item-info h3 {
    font-size: 16px;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .modal-header h2 {
    font-size: 18px;
  }

  .modal-close {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

/* Enhanced Responsive Design for 1920px Base Width - Stock Page */

/* Extra Large Screens (1920px and above) */
@media (min-width: 1920px) {
  .stock-hero h1 {
    font-size: 52px;
  }
  
  .stock-hero p {
    font-size: 20px;
    max-width: 900px;
  }
  
  .stock-layout {
    grid-template-columns: 320px 1fr;
    gap: 50px;
  }
}

/* Large Desktop (1440px - 1919px) */
@media (max-width: 1919px) and (min-width: 1440px) {
  .stock-hero h1 {
    font-size: 46px;
  }
  
  .stock-layout {
    grid-template-columns: 300px 1fr;
    gap: 40px;
  }
}

/* Desktop (1200px - 1439px) */
@media (max-width: 1439px) and (min-width: 1200px) {
  .stock-hero h1 {
    font-size: 40px;
  }
  
  .stock-layout {
    grid-template-columns: 280px 1fr;
    gap: 35px;
  }
}

/* Tablet Landscape (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
  .stock-hero h1 {
    font-size: 36px;
  }
  
  .stock-layout {
    grid-template-columns: 250px 1fr;
    gap: 30px;
  }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
  .stock-hero h1 {
    font-size: 32px;
  }
  
  .stock-hero p {
    font-size: 16px;
  }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) and (min-width: 576px) {
  .stock-hero h1 {
    font-size: 28px;
  }
  
  .stock-hero p {
    font-size: 15px;
  }
  
  .stock-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Small (below 576px) */
@media (max-width: 575px) {
  .stock-hero h1 {
    font-size: 24px;
  }
  
  .stock-hero p {
    font-size: 14px;
  }
  
  .stock-grid {
    grid-template-columns: 1fr;
  }
}
